Diagnose conflicts and uncertain results
A failed response can mean the request was refused, the reviewed version changed, a dependency is unavailable or an effect completed without a known result. The correction depends on that evidence. A timeout or generic 500 is not proof that no database or provider change occurred.
Retain local work and the operation’s identity before retrying. Trace the frontend mutation to identify its owning request and invalidation path. Use the owning domain route and integration recovery contract; do not repeat a real external action merely to see whether the UI becomes green.
Symptoms and first interpretation
Section titled “Symptoms and first interpretation”| Observed result | Likely boundary | First correction |
|---|---|---|
| 401 | Missing or rejected identity | Establish the intended current session/token; do not substitute privileged credentials |
| 400 for missing company | No accepted internal selection | Select and verify a company through the auth flow |
| 403 | Capability, actor or dedicated relationship refused | Check the specific authority and resource context |
| 404 for a scoped record | Missing, deleted or outside the admitted scope | Recheck ID/company/relationship without assuming global absence |
| 409 | Revision, source, lifecycle or replay conflict | Read the operation-specific detail and current evidence |
| 422 | Declared input or domain validation | Correct the named input/rule; retain the proposal |
429 with Retry-After |
Request brake or endpoint limit | Stop the loop and respect the delay; inspect the requesting UI |
| 503 | Dependency/gate or complete-read safety refusal | Diagnose the named cause; narrow an oversized read where instructed |
| Timeout, abort, lost response or unhandled 500 | Outcome may be unresolved | Read back local/remote evidence before deciding on replay |
Status alone is not a complete classifier. A 409 can describe a stale allocation, changed source amounts, a sent quote locked for editing or a reused request identity with different content. Each has a different correction.
Evidence to retain
Section titled “Evidence to retain”Record the exact component/candidate, operation, scoped resource and expected revision or fingerprint. Retain the sanitized response and relevant request/receipt identity. Keep private document text, personal data and credentials out of review artifacts and logs.
For a UI save, distinguish the submitted snapshot from edits made while it was in flight. For an external action, identify the intended recipient/provider document and the durable local intent or receipt. An empty queue or a toast disappearing is not sufficient outcome evidence.
Revision conflict diagnosis
Section titled “Revision conflict diagnosis”For a quote draft, follow editing and conflict recovery: read current fields/rows/recipients and compare them with the base and retained local work. Use the editor’s supported merge choices. For purchase costs, read the current allocation revision and source fingerprint; a provider-source conflict also needs the underlying original/amount review.
Do not replace the expected version with the latest version and submit old values automatically. That would convert concurrency protection into an unchecked overwrite. A replay key also cannot be reused for a different payload.
Timeout and provider recovery
Section titled “Timeout and provider recovery”readFetch bounds GET/HEAD reads, including the response body, to 15 seconds. Supported quote PUT helpers have a 20-second client abort and explicitly ask for a reload to determine whether saving completed. Neither timer cancels a commit already accepted by the server.
A local save can be checked by reading the current version and values. A remote send/export requires the operation’s own receipt and provider reconciliation. If that lookup is unavailable, preserve uncertainty and stop the write retry. In Vi Målar, final attest/export/send touches real Fortnox bookkeeping and must never be used as a test.
The global 500 handler returns generic detail and records a bounded incident code separately from access-controlled exception logs. A complete-read limit returns 503 rather than a misleading partial success. These are different from an outbound-messaging gate, which also uses intentional availability refusal.
Synthetic correction and verification
Section titled “Synthetic correction and verification”Suppose a synthetic cost editor submits revision 7 and receives 409 after another session saves revision 8. It keeps the proposed rows, reloads current source/allocation evidence and obtains a new review decision. Verification checks both that the stale request changed nothing and that the revised valid operation succeeds.
If a provider delivery times out instead, the next check locates the existing intent/receipt and remote document before any repeat. A deterministic route test can prove conflict mapping and no-effect denial with substituted clients. It does not establish a real provider’s outcome. Record that remaining uncertainty explicitly rather than labelling the whole workflow verified.