Skip to content

Extract TooManyRequests and ServerError checks#2881

Closed
adamtheturtle wants to merge 1 commit intomainfrom
adamtheturtle/dedup-too-many-req
Closed

Extract TooManyRequests and ServerError checks#2881
adamtheturtle wants to merge 1 commit intomainfrom
adamtheturtle/dedup-too-many-req

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Feb 25, 2026

Summary

Moves HTTP status code checks for TooManyRequests (429) and ServerError (5xx) from VWS.make_request and VuMarkService.generate_instance_uuid into target_api_request. This centralizes error handling and eliminates duplication across the two callsites.

Test plan

  • All 186 existing tests pass
  • No behavior changes; only refactored how errors are raised

🤖 Generated with Claude Code


Note

Low Risk
Low risk refactor that centralizes existing HTTP error checks; behavior should remain the same aside from ensuring all target_api_request callers now consistently raise on 429 and 5xx responses.

Overview
Centralizes HTTP status handling by moving TooManyRequestsError (429) and ServerError (5xx) checks into target_api_request, and documenting these raises there.

Removes the duplicated 429/5xx guard code and related imports from VWS.make_request and VuMarkService.generate_vumark_instance, so both rely on the shared request helper for these error cases.

Written by Cursor Bugbot for commit 4bdab9d. This will update automatically on new commits. Configure here.

Move HTTP status code checks for TooManyRequests (429) and ServerError (5xx)
from VWS.make_request and VuMarkService.generate_instance_uuid into
target_api_request, eliminating duplication and centralizing error handling.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
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