-
Notifications
You must be signed in to change notification settings - Fork 34
Correctly expose all Databricks error detail types in DatabricksError.
#500
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
Conversation
DatabricksError.
DatabricksError.DatabricksError.
DatabricksError.DatabricksError.
...bricks-sdk-java/src/main/java/com/databricks/sdk/core/error/details/PreconditionFailure.java
Show resolved
Hide resolved
| JsonNode node = mapper.valueToTree(obj); | ||
|
|
||
| // Add the @type field. | ||
| if (node instanceof ObjectNode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should fail otherwise, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right, updated.
| @@ -0,0 +1,123 @@ | |||
| package com.databricks.sdk.core.error.details; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have tests for this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tested indirectly by the ApiClienTest logic. That being said, I would have preferred to not implement this serialization at all. The reason this is needed is because ApiClientTest are designed in a way that forces the error to be serialized.
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
What changes are proposed in this pull request?
This PR makes
ErrorDetailsaccessible inDatabricksError. This is done by replacing the list ofErrorDetailwithErrorDetails. The changes introduced in this PR are breaking for users who depended on the list ofErrorDetail.How is this tested?
Unit and integration tests.