mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-04-29 02:37:27 +09:00
10 lines
364 B
JavaScript
10 lines
364 B
JavaScript
export class StatusError extends Error {
|
|
constructor(message, statusCode, statusMessage) {
|
|
super(message);
|
|
this.name = 'StatusError';
|
|
this.statusCode = statusCode;
|
|
this.statusMessage = statusMessage;
|
|
this.isPermanentError = typeof this.statusCode === 'number' && this.statusCode >= 400 && this.statusCode < 500;
|
|
}
|
|
}
|