Incident case_2a7d51c8e930 · checkout-api / production
IllegalStateTransition: Cart cart_4de81b7a moved from settled to pending
- Environment
production- Service
checkout-api- Package
2026.8.17- Commit
ed23f74- SDK
0.4.0- Captured
Aug 29, 04:55 PM
- Occurrences
9- First seen
Aug 24, 05:18 PM- Last seen
Aug 29, 04:55 PM
Incident status is read-only here. In your own workspace this control writes the status back.
This is what ran before the throw.
Nodes on the rail sit in captured execution order. Arrows are causal claims, and each one carries where it came from.
7 of 7 shown
Drag to pan. Hold ⌘ or ctrl and scroll to zoom.Selected evidence node io-001.
Throw site
src/checkout/cart-state.ts:6464 throw new IllegalStateTransition(cart.id, previousStatus, nextStatus);The local that mattered
lockAcquired = falsecapturedStack
3 app framesassertTransitionsrc/checkout/cart-state.ts:64
Locals
previousStatussettledcapturednextStatuspendingcapturedcart{ "id": "cart_4de81b7a", "status": "settled", "version": 12, "totalCents": 18940 }capturedlockAcquiredfalsecapturedobservedVersionAtRead12capturedobservedVersionAtWrite12captureddeliveryIdwhd_5f10a2capturedsiblingDeliveryIdwhd_5f109ccaptureddeliverySkewMs41derivedComputed during reconstruction from the two concurrent_request observations on this trace.
Bound arguments
cartIdcart_4de81b7acapturedrequestedStatuspendingcaptured
applyPaymentWebhooksrc/checkout/webhooks/payments.ts:137
Locals
providerEventIdpi_8c31d0f4_succeededcapturedlockKeycheckout:lock:cart_4de81b7acapturedlockTtlMs5000capturedlockResultmissingcapturedproceedWithoutLocktruecaptured
Bound arguments
deliveryIdwhd_5f10a2capturedproviderEvent{ "id": "pi_8c31d0f4", "type": "payment_intent.succeeded", "amount": 18940 }captured
paymentsWebhookHandlersrc/routes/webhooks.ts:58
Locals
signatureVerifiedtruecaptureddeliveryAttempt1capturedproviderSignature[redacted]redactedWebhook signatures are credentials and are removed by policy before storage.
Bound arguments
providerpolarcaptured
2 node_modules frames
Object.handlernode_modules/fastify/lib/handleRequest.js:133
Locals
Bound arguments
runMicrotasksnode:internal/process/task_queues:96
Locals
Bound arguments
Raw I/O evidence
5 operations1SET checkout:lock:cart_4de81b7a NX PX 5000SDK marked related to throwredis://checkout-cache.iad.internal:6379/1- Start
0 ms- Duration
0.8 ms
2SELECT carts BY idpostgres://checkout-primary.iad.internal:5432/checkout- Start
1.4 ms- Duration
7.2 ms
3GET /v1/payment_intents/pi_8c31d0f4https://api.polar.sh- Start
9.6 ms- Duration
188.4 ms
4UPDATE carts SET status, version WHERE id AND versionSDK marked related to throwpostgres://checkout-primary.iad.internal:5432/checkout- Start
199.7 ms- Duration
9.1 ms
5PUBLISH checkout.cart.updatedamqp://events.iad.internal/checkout- Start
210.9 ms- Duration
2.3 ms
Request
- Method
POST- Route
/webhooks/payments- Status code
500- Request ID
req_33adc2a0cb353f2b4daa- Region
us-east-1
Headers
content-typeapplication/jsoncaptureduser-agentPolar-Webhook/1.4capturedx-polar-deliverywhd_5f10a2capturedx-polar-eventpayment_intent.succeededcapturedx-polar-signature[redacted]redactedWebhook signatures are credentials and are removed by policy.
Body captured in full: the provider event carries no deny-listed field.
Trace
- Trace ID
0c1bec732afa2a84a288ee707d7785f1- Span ID
28e483bce4bbb845- Parent span ID
293ec5a22f4f914f- Tracestate
acme=checkout-api:1
Process and build
- Node version
v22.23.1- Host
checkout-api-6b5f8d94c-r7tmn- Package version
2026.8.17- Commit SHA
ed23f7483358d17ff4f673aedd0f4762bd83c33c- Reported environment
production- Release
[email protected]- SDK version
0.4.0- Memory
rss 508 MB, heap 224 MB- Event loop lag
31 ms
Completeness
requestcaptured
localscaptured
bound argscaptured
IOcaptured
Measured coverage
Measured from the reconstructed evidence, not from what the SDK reported about itself.
- request
- exactHeaders and body captured under the deny list.
- locals
- exactForensic mode captured every binding in all three frames.
- io
- partialA break in captured sequence sits between seq 6 and seq 8.
- source
- exactThe release artifact digest matched the deployed build.
Specific gaps
observations seq 7One observation between the state write and the cart update is absent from the captured sequence. The break is recorded; nothing about it is inferred.
Agent access
https://mcp.errorcore.dev/sse- Incident ID
inc_2a7d51c8e930- Occurrence ID
occ_40088767fc76b1d6f543b66b52c391ac34e0885b5ae8903af0f8761b4b82081b
MCP instruction
MCP server: https://mcp.errorcore.dev/sse
Tool: get_failure_context
Arguments: {"occurrence_id":"occ_40088767fc76b1d6f543b66b52c391ac34e0885b5ae8903af0f8761b4b82081b"}
Task: Investigate this failure using only the exposed, scrubbed runtime evidence.