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

refactor: update exception logging in CustomErrorHandler #246

Merged
merged 3 commits into from
Jun 6, 2024

Conversation

leafty
Copy link
Member

@leafty leafty commented Jun 6, 2024

Fixes #245.

Sanic exceptions have a quiet property which is used to suppress logging. The custom error handler is updated to use Sanic's default log() method and our custom error classes now also have the quiet attribute.

Details:

  • Add quiet attribute to BaseError
  • Use the default log() method after the formatted_exception has been assigned in the default error handler.
  • Re-order exceptions to be listed by ascending HTTP status code.
  • Suppress "Preferences not found for user." messages.

/deploy #notest

@leafty leafty requested a review from a team as a code owner June 6, 2024 11:00
@leafty leafty marked this pull request as draft June 6, 2024 11:00
@leafty leafty temporarily deployed to renku-ci-ds-246 June 6, 2024 11:00 — with GitHub Actions Inactive
@RenkuBot
Copy link
Contributor

RenkuBot commented Jun 6, 2024

You can access the deployment of this PR at https://renku-ci-ds-246.dev.renku.ch

@leafty leafty temporarily deployed to renku-ci-ds-246 June 6, 2024 11:27 — with GitHub Actions Inactive
@coveralls
Copy link

coveralls commented Jun 6, 2024

Pull Request Test Coverage Report for Build 9399701945

Details

  • 40 of 41 (97.56%) changed or added relevant lines in 3 files are covered.
  • 4 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.03%) to 90.25%

Changes Missing Coverage Covered Lines Changed/Added Lines %
components/renku_data_services/user_preferences/db.py 1 2 50.0%
Files with Coverage Reduction New Missed Lines %
components/renku_data_services/base_api/misc.py 1 95.24%
components/renku_data_services/connected_services/db.py 1 85.93%
components/renku_data_services/crc/models.py 1 84.91%
components/renku_data_services/storage/blueprints.py 1 95.7%
Totals Coverage Status
Change from base Build 9395882496: 0.03%
Covered Lines: 8442
Relevant Lines: 9354

💛 - Coveralls

@leafty leafty temporarily deployed to renku-ci-ds-246 June 6, 2024 11:31 — with GitHub Actions Inactive
@leafty leafty marked this pull request as ready for review June 6, 2024 11:50
@leafty leafty changed the title refactor: update exception logging in CustomErrorHandler refactor: update exception logging in CustomErrorHandler Jun 6, 2024
@leafty leafty enabled auto-merge (squash) June 6, 2024 12:48
@leafty leafty merged commit 1e340ea into main Jun 6, 2024
19 of 25 checks passed
@leafty leafty deleted the leafty/fix-245 branch June 6, 2024 13:00
@RenkuBot
Copy link
Contributor

RenkuBot commented Jun 6, 2024

Tearing down the temporary RenkuLab deplyoment for this PR.

@coveralls
Copy link

coveralls commented Jun 6, 2024

Pull Request Test Coverage Report for Build 9400104332

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 40 of 41 (97.56%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 90.25%

Changes Missing Coverage Covered Lines Changed/Added Lines %
components/renku_data_services/user_preferences/db.py 1 2 50.0%
Totals Coverage Status
Change from base Build 9395882496: 0.03%
Covered Lines: 8442
Relevant Lines: 9354

💛 - Coveralls

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.

make data-service less chatty with Preferences not found for user. messages.
4 participants