Skip to content

toHttpResponse

toHttpResponse(error): HttpResponse

Defined in: packages/pipeline-idempotency/src/http.ts:23

The HTTP answer for an IdempotencyConflictError: 409 Conflict for an operation in progress or a different replay scope, 422 Unprocessable Entity for a key reused with another payload.

IdempotencyConflictError

HttpResponse

const { status, body } = toHttpResponse(error);
res.status(status).json(body);