@opra/common
Version:
Opra common package
24 lines (23 loc) • 752 B
JavaScript
;
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;