Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Fix empty response handling in get_all_buckets#11

Merged
chuongmep merged 1 commit intochuongmep:devfrom
jefferlu:dev
Feb 10, 2025
Merged

Fix empty response handling in get_all_buckets#11
chuongmep merged 1 commit intochuongmep:devfrom
jefferlu:dev

Conversation

@jefferlu
Copy link
Copy Markdown
Contributor

@jefferlu jefferlu commented Feb 9, 2025

Description:
An issue where get_all_buckets fails when the Data Management API returns an empty items list ({'items': []}). Previously, the method attempted to access createdDate, causing a KeyError.

Changes:
Added a check for an empty DataFrame (df.empty) and return it immediately.

Impact:
Prevents errors when the API returns no data.

@chuongmep
Copy link
Copy Markdown
Owner

Hi @jefferlu , good catch, thank you for your fix issue !

@chuongmep chuongmep merged commit b0a81ef into chuongmep:dev Feb 10, 2025
2 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants