Files
certd/packages/libs/lib-server/src/basic/exception/auth-exception.ts
T

20 lines
587 B
TypeScript
Raw Normal View History

2024-07-15 00:30:33 +08:00
import { Constants } from '../constants.js';
import { BaseException } from './base-exception.js';
2025-04-17 22:34:21 +08:00
import { TextException } from "./common-exception.js";
2023-01-29 13:44:19 +08:00
/**
* 授权异常
*/
export class AuthException extends BaseException {
2025-04-17 01:15:55 +08:00
constructor(message?:string) {
super('AuthException', Constants.res.auth.code, message ? message : Constants.res.auth.message);
2023-01-29 13:44:19 +08:00
}
}
2025-04-17 01:15:55 +08:00
2025-04-17 22:34:21 +08:00
export class Need2FAException extends TextException {
constructor(message:string,data:any) {
super('Need2FAException', Constants.res.need2fa.code, message ? message : Constants.res.need2fa.message,data);
2025-04-17 01:15:55 +08:00
}
}