We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
レスポンスとしてクライアントにerr.Error()を返却する場合は、根源のエラーのみを出力するようにする。
このようなコードでは、echoのエラーレスポンスとして内部情報を公開してしまう可能性がある。
if errors.As(err, &entity.ErrNotFound{}) { return echo.NewHTTPError(http.StatusNotFound, err.Error()) }
そのため、下記のようなコードに変更する。
errNF := &entity.ErrNotFound{} if errors.As(err, errNF) { return echo.NewHTTPError(http.StatusNotFound, errNF.Error()) }
The text was updated successfully, but these errors were encountered:
ref: #54
Sorry, something went wrong.
change: エラーの参照方法を変更(#56)
c70e7b3
No branches or pull requests
概要
レスポンスとしてクライアントにerr.Error()を返却する場合は、根源のエラーのみを出力するようにする。
例
このようなコードでは、echoのエラーレスポンスとして内部情報を公開してしまう可能性がある。
そのため、下記のようなコードに変更する。
The text was updated successfully, but these errors were encountered: