@cognigy/rest-api-client
Version:
Cognigy REST-Client
56 lines • 1.89 kB
JavaScript
/* Custom modules */
import { BaseError } from "./baseError";
import { ErrorCode } from "./ErrorCode";
import { HttpStatusCode } from "../helper/HttpStatusCode";
/**
* @openapi
* components:
* responses:
* BadRequestError:
* description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)
* content:
* application/json:
* schema:
* type: object
* properties:
* type:
* type: string
* example: Bad Request
* title:
* type: string
* example: Bad Request Error
* status:
* type: number
* example: 400
* detail:
* type: string
* example: Validation failed. Missing payload.
* instance:
* type: string
* example: /v2.0/flows/5ce7c2d833ea1e04d7e6c432
* code:
* type: string
* example: 1000
* traceId:
* type: string
* example: api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f
* details:
* type: object
* example: {}
*/
export class BadRequestError extends BaseError {
constructor(message, stack, meta, details, logLevel) {
super({
name: "Bad Request Error",
message,
code: ErrorCode.BAD_REQUEST,
httpStatusCode: HttpStatusCode.BAD_REQUEST,
httpStatusText: "Bad Request",
meta,
stack,
details,
logLevel,
});
}
}
//# sourceMappingURL=BadRequestError.js.map