Class: ApplicationError ​
Defined in: packages/errors/src/base.ts:22
Base error class for application-specific errors. Provides structured error information for HTTP APIs.
Example ​
throw new ApplicationError('custom_error', 400, 'Something went wrong', {
cause: 'Invalid input provided'
});Extends ​
Error
Extended by ​
SessionErrorInvalidJsonBodyErrorInvalidContentTypeErrorNotAnEmailErrorNotPartOfAllianceErrorMagicUrlLoginValidationErrorUserIdValidationErrorRequestBodyValidationError
Constructors ​
Constructor ​
new ApplicationError(
code,httpStatus,message,opts?):ApplicationError
Defined in: packages/errors/src/base.ts:32
Parameters ​
code ​
string
httpStatus ​
number
message ​
string
opts? ​
Returns ​
ApplicationError
Overrides ​
Error.constructor
Properties ​
cause ​
readonlycause:string|undefined
Defined in: packages/errors/src/base.ts:28
Human-readable cause of the error
Overrides ​
Error.cause
code ​
readonlycode:string
Defined in: packages/errors/src/base.ts:24
Machine-readable error code
details? ​
readonlyoptionaldetails?:unknown
Defined in: packages/errors/src/base.ts:30
Additional details for debugging
httpStatus ​
readonlyhttpStatus:number
Defined in: packages/errors/src/base.ts:26
HTTP status code
message ​
message:
string
Defined in: node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es5.d.ts:1075
Inherited from ​
Error.message
name ​
name:
string
Defined in: node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es5.d.ts:1074
Inherited from ​
Error.name
stack? ​
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from ​
Error.stack