Finding and correlating errors
Quick triage for the SHOPin storefront accelerator. Error handling documents status codes and response bodies; Logging documents correlation ID, pino-http lines, and redaction. This page only answers where to look first and how to connect browser ↔ Next server ↔ BFF.
Where to look first
| What you observe | First place to inspect |
|---|---|
| User-facing toast, error UI, or redirect | Confirms that something failed—not why internally. |
Network — /bff/... returned 4xx/5xx | Response JSON matches the Error handling contract (status + message; issues on 400). It does not include integration stacks. |
| Same request, need cause (including 500 / Zod / unhandled) | BFF process logs: one line per handled request, correlationId, attached error when relevant — Logging. |
| No HTTP response (timeout, connection refused, DNS) | Presentation server log — bff-fetch-server.ts catch; the BFF may have no line for that attempt. |
Follow one failure end to end
- Reproduce; in DevTools note path, time, and status.
- Obtain
correlationId(response header if exposed, or from logs in the same window—propagation is described under Correlation ID in Logging). - In BFF logs, filter by that id (or path + time if the id is unavailable). Read the single request line and any attached error payload.
- If there is no matching BFF line, treat it as pre-BFF: check presentation server output and BFF reachability (BFF communication, env URLs).
Related
Back to Error handling · Back to Validation & resilience · Back to How to work with SHOPin