@@ -56,32 +56,20 @@ def submit_job(
5656 # Check for authentication/authorization errors
5757 if e .response .status_code == 401 :
5858 logger .error ("❌ Authentication failed: Invalid or expired auth token" )
59- logger .error ("Please check your auth_token and ensure it's valid." )
60- logger .error (
61- "If you're using a shared server, contact your administrator for a valid token."
62- )
6359 raise CyteTypeAPIError (
6460 "Authentication failed during job submission"
6561 ) from e
6662 elif e .response .status_code == 403 :
6763 logger .error ("❌ Authorization failed: Access denied" )
6864 logger .error ("Your auth token doesn't have permission to submit jobs." )
69- logger .error (
70- "If you're using a shared server, contact your administrator for proper permissions."
71- )
7265 raise CyteTypeAPIError (
7366 "Authorization failed during job submission"
7467 ) from e
7568 elif e .response .status_code == 422 :
76- # 422 might indicate auth issues if server is configured to check auth
7769 if auth_token and "auth" in str (error_details ).lower ():
7870 logger .error (
7971 "❌ Authentication may have failed (server returned validation error)"
8072 )
81- logger .error ("Please check your auth_token and ensure it's valid." )
82- logger .error (
83- "If you're using a shared server, contact your administrator for a valid token."
84- )
8573 raise CyteTypeAPIError (
8674 "Possible authentication failure during job submission"
8775 ) from e
@@ -90,6 +78,11 @@ def submit_job(
9078 raise CyteTypeAPIError (
9179 f"Validation error during job submission: { error_details } "
9280 ) from e
81+ elif e .response .status_code == 429 :
82+ logger .error ("❌ Rate limit exceeded" )
83+ raise CyteTypeAPIError (
84+ "Rate limit exceeded. Rate limit is 5 annotation jobs every 24hrs."
85+ ) from e
9386
9487 logger .debug (
9588 f"Network or HTTP error during job submission: { e } . Details: { error_details } "
0 commit comments