Skip to content

Conversation

@renaudhartert-db
Copy link
Contributor

@renaudhartert-db renaudhartert-db commented Aug 13, 2025

What changes are proposed in this pull request?

This PR makes ErrorDetails accessible in DatabricksError. This is done by replacing the list of ErrorDetail with ErrorDetails. The changes introduced in this PR are breaking for users who depended on the list of ErrorDetail.

How is this tested?

Unit and integration tests.

@renaudhartert-db renaudhartert-db changed the title Update DatabricksError Correctly exposes all Databricks error details types in DatabricksError. Aug 13, 2025
@renaudhartert-db renaudhartert-db changed the title Correctly exposes all Databricks error details types in DatabricksError. Correctly exposes all Databricks error detail types in DatabricksError. Aug 13, 2025
@renaudhartert-db renaudhartert-db changed the title Correctly exposes all Databricks error detail types in DatabricksError. Correctly expose all Databricks error detail types in DatabricksError. Aug 13, 2025
JsonNode node = mapper.valueToTree(obj);

// Add the @type field.
if (node instanceof ObjectNode) {
Copy link
Contributor

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?

Copy link
Contributor Author

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;
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-java

Inputs:

  • PR number: 500
  • Commit SHA: ed4048a11e443246a3148156ad9547bf8fe5a25e

Checks will be approved automatically on success.

@renaudhartert-db renaudhartert-db added this pull request to the merge queue Aug 15, 2025
Merged via the queue into main with commit 6cd3cf6 Aug 15, 2025
16 checks passed
@renaudhartert-db renaudhartert-db deleted the renaud-hartert_data/errro3 branch August 15, 2025 07:50
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