Claude Certified Architect – Foundations Practice Question 100: Non Retryable API Errors
Claude Certified Architect, Foundations · Test 10 · question 10 of 10
A nightly pipeline sends batches of scanned PDFs to the Claude API. Its error handler retries every non-200 response five times with backoff. Logs show three recurring patterns that never succeed on retry: 413 request_too_large on requests that bundle many large PDFs, 400 invalid_request_error on malformed content blocks, and 401 authentication_error after a key was revoked. Which change to the handler is correct?
Show answer and explanation
Answer:
D is correct. These responses describe a problem with the request, not with capacity. 413 request_too_large means the request exceeds the maximum size (32 MB for the Messages API), so the payload must be split, downsized or sent via the Files API with file_id references. 400 invalid_request_error means there is an issue with the format or content of the request, and 401 authentication_error means a problem with the API key (malformed, revoked or expired). Resending the same request cannot fix any of them. Backoff retries belong to transient failures such as 429, 500 and 529 (the official SDKs retry those by default).
A is wrong because more attempts at an invalid request only waste time and quota. B is wrong because these errors are about the request and credential, not about regional capacity. C is wrong because retry-after accompanies rate limiting and does not make an oversized or malformed request, or a revoked key, valid.
Reference: Claude API errors