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

[Fix] Minor fix in error message for generic error #799

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dsculptor
Copy link

@dsculptor dsculptor commented Oct 23, 2024

Changes

Minor fix in error message for generic error

Tests

  • make test run locally
  • make fmt applied
  • relevant integration tests applied

Same as: #767

@dsculptor dsculptor changed the title Minor fix in error message for generic error [bugfix] Minor fix in error message for generic error Oct 23, 2024
@dsculptor dsculptor force-pushed the raj/minor-fix branch 3 times, most recently from e4098e1 to bfe9b0b Compare October 23, 2024 14:32
@dsculptor dsculptor changed the title [bugfix] Minor fix in error message for generic error [Fix] Minor fix in error message for generic error Oct 23, 2024
Copy link
Contributor

@mgyucht mgyucht left a comment

Choose a reason for hiding this comment

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

Thanks @dsculptor.

Let's extend this with one more change. In particular, I want to ensure that any error that is not parsed by any of the current error parsers is still handled in a graceful manner. To do this, let's implement a new error parser that is a catch-all error parser that just sets the entire response body as the message. That way, we never need to use this message in the error directly, as this error parser will always succeed. However, we can still log a message saying that we were unable to parse the error and fell back to this catch-all case.

@@ -38,7 +38,7 @@ def _unknown_error(response: requests.Response) -> str:
return (
'This is likely a bug in the Databricks SDK for Python or the underlying '
'API. Please report this issue with the following debugging information to the SDK issue tracker at '
f'https://github.com/databricks/databricks-sdk-go/issues. Request log:```{request_log}```')
Copy link
Contributor

Choose a reason for hiding this comment

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

Whoops, nice catch!

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