Skip to content

Failed Request Recorder

The FailedRequestRecorder middleware captures details about requests that result in unhandled exceptions or 500 errors. These records can be used for debugging or replaying requests later.

import { FailedRequestRecorder } from 'shokupan';
app.use(FailedRequestRecorder());

The captured failures are viewable in the Debug Dashboard. You can inspect the error, stack trace, headers, and body, and even replay the request from the dashboard.

OptionTypeDefaultDescription
maxCapacitynumber10000Maximum number of failed requests to store.
ttlnumber86400000 (24h)Time to live for stored failures (ms).