@banana-universe/bananajs / UnauthorisedError
Class: UnauthorisedError
Defined in: packages/bananajs/src/lib/Response/ApiError.ts:80
Extends
Constructors
Constructor
new UnauthorisedError(
message?):UnauthorisedError
Defined in: packages/bananajs/src/lib/Response/ApiError.ts:86
Creates a new instance of UnauthorisedError.
Parameters
message?
string = 'Unauthorised'
A descriptive message accompanying the error. Defaults to 'Unauthorised'.
Returns
UnauthorisedError
Overrides
Properties
cause?
optionalcause?:unknown
Defined in: docs-site/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
message
message:
string='error'
Defined in: packages/bananajs/src/lib/Response/ApiError.ts:31
Inherited from
name
name:
string
Defined in: docs-site/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: docs-site/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
type
type:
ErrorType
Defined in: packages/bananajs/src/lib/Response/ApiError.ts:31
Inherited from
prepareStackTrace?
staticoptionalprepareStackTrace?: (err,stackTraces) =>any
Defined in: node_modules/@types/node/globals.d.ts:11
Optional override for formatting stack traces
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:13
Inherited from
Methods
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:4
Create .stack property on a target object
Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
handle()
statichandle(err,res):Response
Defined in: packages/bananajs/src/lib/Response/ApiError.ts:35
Parameters
err
res
Response
Returns
Response