UNPKG

@opra/common

Version:
24 lines (23 loc) 752 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MethodNotAllowedError = void 0; const opra_http_error_js_1 = require("../opra-http-error.js"); /** * 405 Method Not Allowed * The request method is known by the server but is not supported by the target resource. * For example, an API may not allow calling DELETE to remove a resource. */ class MethodNotAllowedError extends opra_http_error_js_1.OpraHttpError { constructor() { super(...arguments); this.status = 405; } init(issue) { super.init({ message: 'Method not allowed', code: 'METHOD_NOT_ALLOWED', ...issue, }); } } exports.MethodNotAllowedError = MethodNotAllowedError;