blob: f5c3fcd6cb9e9de17bb511f5a37a37ad1590b2a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
/**
* ID付きエラー
*/
export class IdentifiableError extends Error {
public message: string;
public id: string;
/**
* Indicates that this is a temporary error that may be cleared by retrying
*/
public readonly isRetryable: boolean;
constructor(id: string, message?: string, isRetryable = false) {
super(message);
this.message = message ?? '';
this.id = id;
this.isRetryable = isRetryable;
}
}
|