UnauthenticatedError
talawa-api • Docs
talawa-api / libraries/errors/unauthenticatedError / UnauthenticatedError
Class: UnauthenticatedError
This class represents an error indicating an unauthenticated request. It extends the ApplicationError class to handle and format the error information.
Extends
Constructors
new UnauthenticatedError()
> new UnauthenticatedError(message
, code
, param
, metadata
): UnauthenticatedError
Creates an instance of UnauthenticatedError.
Parameters
• message: string
= "UnauthenticatedError"
The error message (default is "UnauthenticatedError").
• code: null
| string
= null
Optional error code (default is null).
• param: null
| string
= null
Optional parameter associated with the error (default is null).
• metadata: Record
<any
, any
> = \{\}
Optional additional metadata associated with the error (default is an empty object).
Returns
Overrides
Defined in
src/libraries/errors/unauthenticatedError.ts:16
Properties
errors
> errors: InterfaceError
[]
An array of errors conforming to the InterfaceError interface
Inherited from
Defined in
src/libraries/errors/applicationError.ts:21
httpCode
> httpCode: number
The HTTP status code associated with the error
Inherited from
Defined in
src/libraries/errors/applicationError.ts:23
message
> message: string
Inherited from
Defined in
node_modules/typescript/lib/lib.es5.d.ts:1077
name
> name: string
Inherited from
Defined in
node_modules/typescript/lib/lib.es5.d.ts:1076
stack?
> optional
stack: string
Inherited from
Defined in
node_modules/typescript/lib/lib.es5.d.ts:1078
prepareStackTrace()?
> static
optional
prepareStackTrace: (err
, stackTraces
) => any
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
ApplicationError
.prepareStackTrace
Defined in
node_modules/@types/node/globals.d.ts:143
stackTraceLimit
> static
stackTraceLimit: number
Inherited from
ApplicationError
.stackTraceLimit
Defined in
node_modules/@types/node/globals.d.ts:145
Methods
captureStackTrace()
> static
captureStackTrace(targetObject
, constructorOpt
?): void
Create .stack property on a target object
Parameters
• targetObject: object
• constructorOpt?: Function
Returns
void
Inherited from
ApplicationError
.captureStackTrace
Defined in
node_modules/@types/node/globals.d.ts:136