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

Add APIError to replace "database query error" #204

Merged
merged 6 commits into from
Mar 4, 2021
Merged

Add APIError to replace "database query error" #204

merged 6 commits into from
Mar 4, 2021

Conversation

zanieb
Copy link
Contributor

@zanieb zanieb commented Mar 4, 2021

Summary

To improve error handling in Server and Cloud, we replace the obscure ValueError("database query error") with a simple APIError with a fixed message. This also consolidates the ServerException base into a PrefectBackendException in preparation for shared custom exceptions across Server/Cloud.

Supersedes https://github.com/PrefectHQ/cloud/pull/3103 and will require a follow-up in Cloud (https://github.com/PrefectHQ/cloud/pull/3144) to use these exceptions instead of doubly defined CloudException types.

Importance

Improves exception handling traces at a low level.

Checklist

This PR:

  • adds new tests (if appropriate)
  • adds a change file in the changes/ directory (if appropriate)

@zanieb zanieb marked this pull request as ready for review March 4, 2021 18:57
@zanieb zanieb requested review from cicdw and jlowin as code owners March 4, 2021 18:57
@zanieb zanieb merged commit 600aafc into master Mar 4, 2021
@zanieb zanieb deleted the api-errors branch March 4, 2021 22:34
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