@rafat97/exceptionhandler
Version:
All types exception handler classes definition
25 lines • 913 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnsupportedMediaTypeException = void 0;
const CustomError_1 = require("./CustomError");
/*
415 Unsupported Media Type
The media format of the requested data is not supported by the server,
so the server is rejecting the request.
*/
class UnsupportedMediaTypeException extends CustomError_1.CustomError {
constructor(message = "Unsupported Media Type") {
super(message);
this.message = message;
this.statusCode = 415;
Object.setPrototypeOf(this, UnsupportedMediaTypeException.prototype);
}
getStatusCode() {
return this.statusCode;
}
serializeErrors() {
return { message: this.message, details: [] };
}
}
exports.UnsupportedMediaTypeException = UnsupportedMediaTypeException;
//# sourceMappingURL=UnsupportedMediaTypeException.js.map