mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-03 02:05:47 +02:00
Better error handling
This commit is contained in:
@@ -14,6 +14,6 @@ export function genId(date?: Date): string {
|
||||
case 'meid': return genMeid(date);
|
||||
case 'ulid': return ulid(date.getTime());
|
||||
case 'objectid': return genObjectId(date);
|
||||
default: throw 'unknown id generation method';
|
||||
default: throw new Error('unknown id generation method');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user