mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-06-30 23:38:01 +09:00
3.0.1
This commit is contained in:
9
built/utils/status-error.js
Normal file
9
built/utils/status-error.js
Normal file
@ -0,0 +1,9 @@
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user