Skip to content

Commit

Permalink
remove redundant error
Browse files Browse the repository at this point in the history
  • Loading branch information
logica0419 committed Dec 8, 2023
1 parent 8ab4114 commit 6e61063
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion router/utils/process_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func saveUploadImage(p imaging2.Processor, c echo.Context, m file.Manager, name
b, err := p.FitAnimationGIF(src, maxImageSize, maxImageSize)
if err != nil {
switch err {
case imaging2.ErrInvalidImageSrc, imaging2.ErrTimeout:
case imaging2.ErrInvalidImageSrc:
// 不正なgifである
return uuid.Nil, herror.BadRequest(badImage)
default:
Expand Down
1 change: 0 additions & 1 deletion service/imaging/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
var (
ErrPixelLimitExceeded = errors.New("the image exceeds max pixels limit")
ErrInvalidImageSrc = errors.New("invalid image src")
ErrTimeout = errors.New("processing timeout")
)

type Config struct {
Expand Down

0 comments on commit 6e61063

Please sign in to comment.