fix: improve error handling for hCaptcha 500 errors (Issue #7)#21
Open
JosefVacha wants to merge 1 commit into
Open
fix: improve error handling for hCaptcha 500 errors (Issue #7)#21JosefVacha wants to merge 1 commit into
JosefVacha wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves error handling for 500 Server Errors caused by hCaptcha protection on Udio's API endpoints. Updates documentation to inform users about the current state of the API wrapper.
Root Cause
Udio implemented hCaptcha protection on their
/generate-proxyendpoint in April 2024. Automated requests without proper browser session/captcha solving now return500 Server Error. The original code did not distinguish between general server errors and hCaptcha-related blocks.Proposed Changes
udio_wrapper/init.py: Enhanced
make_request()method to:generate-proxyendpoint and provide specific hCaptcha-related error messagerequests.exceptions.TimeoutREADME.md: Added "Known Issues" section documenting:
Verification Results
All syntax and code quality checks passed:
python3 -m py_compile udio_wrapper/__init__.pyNote: The repository does not contain automated unit tests. Changes were verified through syntax validation and code review. The modifications are primarily defensive error handling and documentation updates that do not alter core functionality.
Important Note
This PR does not "auto-solve" hCaptcha as originally requested in the bounty. Based on the issue discussion:
This PR provides the best actionable solution: clear error messaging, documentation of the current state, and guidance for users seeking workarounds.