Skip to content

Commit

Permalink
Merge pull request #536 from traPtitech/fix/checker_status_code
Browse files Browse the repository at this point in the history
checkerのエラーのstatusコードが全て403になっていた
  • Loading branch information
mazrean authored Dec 24, 2022
2 parents 93b2820 + 91ae4f0 commit 740ce45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/handler/v2/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ func (checker *Checker) check(ctx context.Context, input *openapi3filter.Authent

err := checkerFunc(ctx, input)
if err != nil {
return fmt.Errorf("failed to check security scheme: %w", err)
// fmt.Errorfでwrapすると*echo.HTTPError型でなくなりstatus codeが403になってしまうので、
// ここではwrapしてはいけない
return err
}

return nil
Expand Down

0 comments on commit 740ce45

Please sign in to comment.