Skip to content

Commit

Permalink
Remove annoying error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
robertabcd committed Jul 14, 2021
1 parent b58c37f commit 6a3f2a6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions aid_finder.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"bytes"
"log"
"regexp"

"github.com/ptt/pttweb/pttbbs"
Expand Down Expand Up @@ -61,7 +60,6 @@ type boardname interface {
func handleAidText(ctx context.Context, input []byte, m richcontent.MatchIndices) (string, error) {
bn, ok := ctx.Value(CtxKeyBoardname).(boardname)
if !ok {
log.Println("no ArticleRequest present")
return "", nil // Silently fail
}

Expand Down
2 changes: 1 addition & 1 deletion cached_ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func generateBbsIndex(key cache.Key) (cache.Cacheable, error) {
page = paging.LastPageNo()
paging.SetPageNo(page)
} else if err := paging.SetPageNo(page); err != nil {
return nil, err
return nil, NewNotFoundError(err)
}

// Fetch article list
Expand Down

0 comments on commit 6a3f2a6

Please sign in to comment.