httpAnswer
Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.
httpAnswer(
error):HttpAnswer|undefined
Defined in: packages/nestjs/src/filters/http-exception.ts:145
The NestJS exception and headers for an error of a @cqrs-ddd package, or
undefined for any other error. A ZodValidationError becomes the
BadRequestException NestJS’s validation pipe throws (message lists the
issues); a denied action, a disabled feature, an exceeded rate limit and an
idempotency conflict take the status, body and headers their package’s
toHttpResponse defines; a @cqrs-ddd/core domain error takes
domainErrorHttpStatus. Every body has NestJS’s statusCode, message and
error.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”HttpAnswer | undefined
Example
Section titled “Example”const answer = httpAnswer(new RateLimitExceededError(details));answer?.exception.getStatus(); // 429answer?.headers; // { 'Retry-After': '3' }