egirlskey/packages/backend/src/misc/identifiable-error.ts

19 lines
353 B
TypeScript
Raw Normal View History

/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* 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);
2022-09-17 18:27:08 +00:00
this.message = message ?? '';
this.id = id;
}
}