A browser fetches HTML, then scripts, styles and data. The main document can return 200 while another failed request prevents the application from starting. Follow the path through to the visible result.
Send a normal GET
curl -i shows response headers and the body. -sS hides the progress meter but retains errors, and --max-time bounds the wait. curl -I sends HEAD; start with GET when checking content.
curl -sS -i --max-time 5 http://localhost:8080/healthHTTP/1.1 200 OK
Content-Type: application/json
{"status":"ok"}A health endpoint and the home page test different things. A successful health response does not prove that a user journey works.
Inspect the failing resource
Open DevTools → Network and Console, then reload. Find the first failing request: a wrong JavaScript path, HTML returned as a script, an incorrect MIME type or an API error. Compare expected and actual content.
curl -sS -i --max-time 5 http://localhost/assets/app.jsHTTP/1.1 200 OK
Content-Type: text/html
<!DOCTYPE html>...The example has a successful status but returns HTML at a script URL. The response content and browser error reveal the problem.
Verify the user-visible result
After a change, recheck the same URL and resource, reload and inspect the Console. Verify that the expected interface appears and its main action works. curl does not execute JavaScript, so browser verification is a separate step.
The blank-page case includes a user-view preview. Use it before and after your fix.
Match HTML, JavaScript and MIME type
In the blank-page case, compare the HTML script reference, the real assets file and nginx’s rule for that URL. A 200 may contain old HTML or the wrong content type. An existing JavaScript file cannot help if HTML references another version.
Repeat the exact resource request after the change, then verify the visible interface. The case preview executes the page like a user’s browser; curl tests HTTP behavior without replacing that check.
curl -sS --max-time 5 http://localhost/
curl -sS -I --max-time 5 http://localhost/assets/app.jsapp.js is an example. Headers help inspect MIME; use a separate GET on the actual HTML reference to verify its content.
From symptom to check
| Observation | Next check | How to interpret it |
|---|---|---|
| 502 | Proxy and upstream reachability | A middle layer responded; investigate its backend. |
| 200 with a blank page | Console, Network and script URL | HTML arrived, but application loading or execution may have failed. |
| app.js returns HTML | Body, Content-Type, location | Compare the expected resource with nginx’s actual response. |
Common mistakes
- Checking only HEAD and drawing conclusions about content.
- Treating /health returning 200 as a store-page test.
- Fixing a JavaScript file that HTML never references.
How to prove recovery
- Repeat the original URL and request method.
- Check the failing resource’s Content-Type and body.
- Inspect the Console after a fresh page load.
- Verify the interface appears and its main user action works.
MINI INCIDENT
What does a green 200 establish?
The home page returns 200, but the browser reports a script MIME error. The JavaScript URL serves HTML. Which layer should you inspect before restarting the API?
GET / 200 text/html
GET /assets/app.js 200 text/htmlExplore the diagnosis
Inspect the script reference and nginx’s assets rule. The server returned a successful HTTP response with the wrong content. Restarting the API does not repair a mismatched URL or static path.
WORKSHOP
Workshop: explain the evidence and choose an action
Liveness is green while the user operation is broken. Choose the right level of evidence.
GET /health → 200 {"status":"ok"}
GET /api/orders → 500
GET / → 200 text/htmlWhich conclusion does each response support?
Compare your reasoning
Health confirms its narrow contract; / confirms document delivery; /api/orders demonstrates the required operation failing. Success on one route does not generalize to the others.
What must stay the same in a repeat probe?
Compare your reasoning
Preserve method, URL, relevant headers, body and client context. Otherwise the new probe tests a different operation and creates a misleading comparison.
Which test is required before closure?
Compare your reasoning
The original user operation and expected content, not just its status. A 200 carrying an application-error JSON body can still represent a broken operation.
CHECK YOUR UNDERSTANDING
The home page returns 200, but app.js receives HTML. Where should you look?
Show explanation
Check the script URL in HTML and static-file routing. The main page status does not confirm that JavaScript loaded correctly.
No comments yet. Share your first impression or ask a question about this topic.