The interview problem
An integration suddenly fails parsing JSON even though the endpoint returns HTTP 200. Investigate the actual response contract.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Assume a proxy or authentication layer may sit in front of the service. Capture status, content type, request ID and a safely redacted response prefix. Check whether the body is an HTML login page, compressed data, an error envelope or a changed schema. Validate media type and schema before business processing. Agree with the customer which failures are retryable and which require configuration or authentication repair.
2. Trace the design or derivation
Check status and headers → validate representation → classify error → repair contract → retry safely
A useful support artifact includes the redirect chain and final host without credentials or sensitive query parameters. Authentication middleware may convert a machine-readable failure into a human login page. Agree an API-specific error contract with the customer so clients can distinguish expired credentials from malformed business data.
3. Calculate the example
A 200 response containing '<html>' is not a successful JSON business result. Retrying it 100 times adds load without converting a login redirect into data. Record one bounded diagnostic sample and surface a contract/authentication error.
4. Failure cases and trade-offs
Some servers mislabel content type, so sniffing can aid diagnosis but should not silently redefine the production contract. Strict validation catches upstream changes early while permissive parsing may hide them until fields are corrupted. Never log an entire response that could contain customer data or credentials.
5. Validation, follow-ups and self-review
Test HTML success pages, compressed errors, missing headers and valid empty responses. Follow-up: when should redirects be followed? Self-review: separate transport status, representation validity and business success.
Sources and related practice
Technical reference: httpwg.org — HTTP validators, ranges, preconditions and representation semantics; customer workflows are original examples.
Source publication/update: June 2022. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Separate browser CORS failures from API failures; Integrate an AI workflow with an unreliable legacy API.
Continue your preparation
Choose a connected learning path or browse more FDE interviews questions. Read our editorial method and attribution policy.