Skip to content

toHttpResponse

toHttpResponse(error): HttpResponse

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

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. The body carries the reason and never the stored key, which holds the tenant and the principal.

IdempotencyConflictError

HttpResponse

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