feat: establish NekoNest Cloud control and relay
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
export class DomainError extends Error {
|
||||
readonly code: string;
|
||||
readonly status: number;
|
||||
readonly retryable: boolean;
|
||||
readonly retryAfterSeconds?: number;
|
||||
readonly actionUrl?: string;
|
||||
|
||||
constructor(
|
||||
code: string,
|
||||
message: string,
|
||||
status = 400,
|
||||
retryable = status >= 500 || status === 429,
|
||||
retryAfterSeconds?: number,
|
||||
actionUrl?: string,
|
||||
) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
this.status = status;
|
||||
this.retryable = retryable;
|
||||
this.retryAfterSeconds = retryAfterSeconds;
|
||||
this.actionUrl = actionUrl;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user