Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### Bug Fixes
- Improving the error message that is shown when the unsupported `dbutils.credentials.getServiceCredentialsProvider` method is used. This method can only be used inside of a notebook.
- Check for string body type while logging error message.
Copy link
Contributor

@renaudhartert-db renaudhartert-db Oct 22, 2025

Choose a reason for hiding this comment

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

I think we could have a message that explains a little more what the change is about. For example, as a reader, I'm wondering "what does checking for string body type" actually does? I believe something like the following would more useful:

Fix a TypeError error when logging non-string body types in RoundTrip.

Also, could you update the change log above so that it phrased at the imperative tense? That is "Improve the error message ..."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @renaudhartert-db, thanks for the review.

The PR is WIP and I just added a short line so it doesn't fail check for next changelog test, was planning to elaborate it and add test before sending it to review.


### Documentation

Expand Down
2 changes: 2 additions & 0 deletions databricks/sdk/logger/round_trip_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def _recursive_marshal(self, v: Any, budget: int) -> Any:
return v

def _redacted_dump(self, prefix: str, body: str) -> str:
if not isinstance(body, str):
return "unsupported body type"
Comment on lines +113 to +114
Copy link
Contributor

Choose a reason for hiding this comment

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

The method signature says that this should be a string. Either adjust the type to cover all potential cases or make sure that the method is only called with string inputs.

if len(body) == 0:
return ""
try:
Expand Down
Loading