summaryrefslogtreecommitdiff
path: root/packages/backend/src/misc/identifiable-error.ts
blob: 13c41f1e3bd6064059510f905c402458bb78f4d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * 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;

	constructor(id: string, message?: string) {
		super(message);
		this.message = message ?? '';
		this.id = id;
	}
}