Skip to content
New issue

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

Drop 404 errors down to a warning. #426

Merged
merged 1 commit into from
Aug 30, 2021
Merged

Conversation

dlorenc
Copy link
Member

@dlorenc dlorenc commented Aug 29, 2021

We get flooded with scapers so it makes it hard to find real errors in our logs.

Signed-off-by: Dan Lorenc [email protected]

We get flooded with scapers so it makes it hard to find real errors in our logs.

Signed-off-by: Dan Lorenc <[email protected]>
@cpanato cpanato added this to the v1.0.0 milestone Aug 30, 2021
if apiErr, ok := err.(errors.Error); ok && apiErr.Code() == http.StatusNotFound {
log.RequestIDLogger(r).Warn(err)
} else {
log.RequestIDLogger(r).Error(err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want to collapse the debug statement below into the else clause?

otherwise LGTM

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it that way on purpose, debug logs seem fine all the time, especially if they get more info out of the request.

@dlorenc dlorenc merged commit 9379bef into sigstore:main Aug 30, 2021
@dlorenc dlorenc deleted the warn404 branch August 30, 2021 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants