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

chore: Do not log warn message for 405 and 404 status code responses #2854

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

seakayone
Copy link
Contributor

@seakayone seakayone commented Sep 29, 2023

In Datadog we have a lot of warn messages:

[405] HEAD http://api.dasch.swiss/admin/projects took: 1ms
[404] NOT_FOUND http://api.dasch.swiss/admin/projects took: 1ms

However, there is nothing we can do about a client using a method which is not supported and NotFound responses are also expected to happen. Hence, reduce the logging to debug in these cases.

Pull Request Checklist

Task Description/Number

Issue Number: NO-TICKET

Basic Requirements

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • fix: represents bug fixes
  • refactor: represents production code refactoring
  • feat: represents a new feature
  • docs: documentation changes (no production code change)
  • chore: maintenance tasks (no production code change)
  • test: all about tests: adding, refactoring tests (no production code change)
  • other... Please describe:

Does this PR introduce a breaking change?

  • Yes
  • No
  • Maybe (not 100% sure => check with FE)

Does this PR change client-test-data?

  • Yes (don't forget to update the JS-LIB team about the change)
  • No

In Datadog we have a lot of warn messages:

[405] HEAD http://api.dasch.swiss/admin/projects took: 1ms

However, there is nothing we can do about a client using a method which is not supported and NotFound responses are also expected to happen. Hence, reduce the logging to debug in these cases.
@seakayone seakayone self-assigned this Sep 29, 2023
@seakayone seakayone marked this pull request as ready for review September 29, 2023 09:52
@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (12402f3) 18.00% compared to head (a7a4e40) 88.04%.
Report is 72 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2854       +/-   ##
===========================================
+ Coverage   18.00%   88.04%   +70.04%     
===========================================
  Files         281      243       -38     
  Lines       28899    23093     -5806     
===========================================
+ Hits         5202    20333    +15131     
+ Misses      23697     2760    -20937     

see 228 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@BalduinLandolt BalduinLandolt left a comment

Choose a reason for hiding this comment

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

Thank you! this has been over-due :)

@seakayone seakayone merged commit d9fd81c into main Sep 29, 2023
@seakayone seakayone deleted the chore/reduce-warn-logging branch September 29, 2023 10:47
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.

2 participants