Class: NotAnEmailError ​
Defined in: packages/errors/src/index.ts:62
Error thrown when provided email is invalid or not allowed.
Example ​
if (!isValidEmail(email)) {
throw new NotAnEmailError('Registration not possible', {
cause: 'Invalid email format'
});
}Extends ​
Constructors ​
Constructor ​
new NotAnEmailError(
message?,opts?):NotAnEmailError
Defined in: packages/errors/src/index.ts:63
Parameters ​
message? ​
string = 'Registration not possible'
opts? ​
Returns ​
NotAnEmailError
Overrides ​
Properties ​
cause ​
readonlycause:string|undefined
Defined in: packages/errors/src/base.ts:28
Human-readable cause of the error
Inherited from ​
code ​
readonlycode:string
Defined in: packages/errors/src/base.ts:24
Machine-readable error code
Inherited from ​
details? ​
readonlyoptionaldetails?:unknown
Defined in: packages/errors/src/base.ts:30
Additional details for debugging
Inherited from ​
httpStatus ​
readonlyhttpStatus:number
Defined in: packages/errors/src/base.ts:26
HTTP status code
Inherited from ​
message ​
message:
string
Defined in: node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es5.d.ts:1075
Inherited from ​
name ​
name:
string
Defined in: node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es5.d.ts:1074
Inherited from ​
stack? ​
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es5.d.ts:1076