use IdentifiableError
This commit is contained in:
parent
2883f28b87
commit
82c2f6f392
|
@ -4,13 +4,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
import { QueryFailedError } from 'typeorm';
|
|
||||||
import * as OTPAuth from 'otpauth';
|
import * as OTPAuth from 'otpauth';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import type { MiUserProfile, UserProfilesRepository, UsersRepository } from '@/models/_.js';
|
import type { MiUserProfile, UserProfilesRepository, UsersRepository } from '@/models/_.js';
|
||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js';
|
import { IdentifiableError } from "@/misc/identifiable-error.js";
|
||||||
import type { MiLocalUser } from '@/models/User.js';
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class UserAuthService {
|
export class UserAuthService {
|
||||||
|
@ -38,7 +36,7 @@ export class UserAuthService {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (delta === null) {
|
if (delta === null) {
|
||||||
throw new Error('authentication failed');
|
throw new IdentifiableError('7d0a7d85-206c-4d16-8cf3-8af92249a082', 'authentication failed');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue