Skip to content

fix: handle empty collections in download endpoint#263

Merged
joaquingx merged 1 commit intodevfrom
update-download-api
Aug 26, 2025
Merged

fix: handle empty collections in download endpoint#263
joaquingx merged 1 commit intodevfrom
update-download-api

Conversation

@joaquingx
Copy link
Contributor

Previously, the download endpoint would throw a 500 error when attempting to download from empty collections due to division by zero when calculating docs_limit. Now gracefully handles this case by falling back to MAX_WEB_DOWNLOAD_SIZE when the collection is empty or size estimation fails.

🤖 Generated with Claude Code

Description

Please include a summary of the changes, relevant motivation and context.

Issue

  • Github Issue ID.

Checklist before requesting a review

  • I have performed a self-review of my code.
  • My code follows the style guidelines of this project.
  • I have made corresponding changes to the documentation.
  • New and existing tests pass locally with my changes.
  • If this change is a core feature, I have added thorough tests.
  • If this change affects or depends on the behavior of other estela repositories, I have created pull requests with the relevant changes in the affected repositories. Please, refer to our official documentation.
  • I understand that my pull request may be closed if it becomes obvious or I did not perform all of the steps above.

Previously, the download endpoint would throw a 500 error when attempting to download from empty collections due to division by zero when calculating docs_limit. Now gracefully handles this case by falling back to MAX_WEB_DOWNLOAD_SIZE when the collection is empty or size estimation fails.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@joaquingx joaquingx merged commit d185e94 into dev Aug 26, 2025
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.

1 participant