@opra/common
Version:
Opra common package
20 lines (19 loc) • 506 B
JavaScript
import { OpraHttpError } from '../opra-http-error.js';
/**
* 500 Internal Server Error
* The server has encountered a situation it does not know how to handle.
*/
export class InternalServerError extends OpraHttpError {
constructor() {
super(...arguments);
this.status = 500;
}
init(issue) {
super.init({
message: 'Internal server error',
code: 'INTERNAL_SERVER_ERROR',
severity: 'fatal',
...issue,
});
}
}