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