Skip to content

Fix user-scoped database list ErrorResponse failure#16

Merged
dauglyon merged 1 commit intomainfrom
fix/error-response-user-databases
Feb 21, 2026
Merged

Fix user-scoped database list ErrorResponse failure#16
dauglyon merged 1 commit intomainfrom
fix/error-response-user-databases

Conversation

@dauglyon
Copy link
Collaborator

Summary

  • When BERDL's get_namespace_prefix(tenant=None) returns an ErrorResponse instead of NamespacePrefixResponse, the user database list in the Data Dictionary crashes with 'ErrorResponse' object has no attribute 'username'
  • Added fallback in DatabasesHandler: when get_namespace_prefix fails for user scope, derive the prefix from get_my_groups() username (u_{username}__)
  • Added ErrorResponse detection to both get_my_groups and get_namespace_prefix BERDL wrappers so failures surface clear error messages instead of cryptic AttributeErrors

Test plan

  • Open Data Dictionary for user-scoped databases in an environment where get_namespace_prefix(tenant=None) returns ErrorResponse — should now show databases correctly
  • Verify tenant-scoped database lists still work as before
  • Verify sidebar tree still loads correctly

When BERDL's get_namespace_prefix(tenant=None) returns an ErrorResponse
instead of a NamespacePrefixResponse, the user database list fails with
a confusing AttributeError. Fix by falling back to deriving the user
namespace prefix from the username (via get_my_groups) when the call
fails for user scope. Also add ErrorResponse detection to both BERDL
wrappers so failures surface clear error messages.
@dauglyon dauglyon requested a review from Tianhao-Gu February 21, 2026 01:49
@github-actions
Copy link

Prerelease: pr-16

Wheel will be attached once the build completes. Updated on each push.

Copy link

@Tianhao-Gu Tianhao-Gu left a comment

Choose a reason for hiding this comment

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

🔥

@dauglyon dauglyon merged commit 58b6538 into main Feb 21, 2026
7 checks passed
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