@avonjs/avonjs
Version:
A fluent Node.js API generator.
27 lines (26 loc) • 772 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const ResponsableException_1 = __importDefault(require("./ResponsableException"));
class MethodNotAllowedException extends ResponsableException_1.default {
message;
constructor(message = 'The requested method is not supported for this endpoint.') {
super(message);
this.message = message;
}
/**
* Get the response code
*/
getCode() {
return 405;
}
/**
* Get the exception name
*/
getName() {
return 'MethodNotAllowed';
}
}
exports.default = MethodNotAllowedException;