UNPKG

@opra/common

Version:
24 lines (23 loc) 752 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BadRequestError = void 0; const opra_http_error_js_1 = require("../opra-http-error.js"); /** * 400 Bad Request * 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). */ class BadRequestError extends opra_http_error_js_1.OpraHttpError { constructor() { super(...arguments); this.status = 400; } init(issue) { super.init({ message: 'Bad request', code: 'BAD_REQUEST', ...issue, }); } } exports.BadRequestError = BadRequestError;