MCP TypeScript SDK (V2) / @modelcontextprotocol/server-legacy / auth/errors
auth/errors
Classes
AccessDeniedError
Defined in: packages/server-legacy/src/auth/errors.ts:91
Access denied error - The resource owner or authorization server denied the request.
Extends
Constructors
Constructor
new AccessDeniedError(
message,errorUri?):AccessDeniedError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='access_denied'
Defined in: packages/server-legacy/src/auth/errors.ts:92
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
CustomOAuthError
Defined in: packages/server-legacy/src/auth/errors.ts:177
A utility class for defining one-off error codes
Extends
Constructors
Constructor
new CustomOAuthError(
customErrorCode,message,errorUri?):CustomOAuthError
Defined in: packages/server-legacy/src/auth/errors.ts:178
Parameters
customErrorCode
string
message
string
errorUri?
string
Returns
Overrides
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string
Defined in: packages/server-legacy/src/auth/errors.ts:7
Inherited from
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:186
Returns
string
Overrides
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
InsufficientScopeError
Defined in: packages/server-legacy/src/auth/errors.ts:162
Insufficient scope error - The request requires higher privileges than provided by the access token.
Extends
Constructors
Constructor
new InsufficientScopeError(
message,errorUri?):InsufficientScopeError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='insufficient_scope'
Defined in: packages/server-legacy/src/auth/errors.ts:163
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
InvalidClientError
Defined in: packages/server-legacy/src/auth/errors.ts:51
Invalid client error - Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method).
Extends
Constructors
Constructor
new InvalidClientError(
message,errorUri?):InvalidClientError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='invalid_client'
Defined in: packages/server-legacy/src/auth/errors.ts:52
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
InvalidClientMetadataError
Defined in: packages/server-legacy/src/auth/errors.ts:155
Invalid client metadata error - The client metadata is invalid. (Custom error for dynamic client registration - RFC 7591)
Extends
Constructors
Constructor
new InvalidClientMetadataError(
message,errorUri?):InvalidClientMetadataError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='invalid_client_metadata'
Defined in: packages/server-legacy/src/auth/errors.ts:156
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
InvalidGrantError
Defined in: packages/server-legacy/src/auth/errors.ts:60
Invalid grant error - The provided authorization grant or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.
Extends
Constructors
Constructor
new InvalidGrantError(
message,errorUri?):InvalidGrantError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='invalid_grant'
Defined in: packages/server-legacy/src/auth/errors.ts:61
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
InvalidRequestError
Defined in: packages/server-legacy/src/auth/errors.ts:43
Invalid request error - The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.
Extends
Constructors
Constructor
new InvalidRequestError(
message,errorUri?):InvalidRequestError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='invalid_request'
Defined in: packages/server-legacy/src/auth/errors.ts:44
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
InvalidScopeError
Defined in: packages/server-legacy/src/auth/errors.ts:84
Invalid scope error - The requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner.
Extends
Constructors
Constructor
new InvalidScopeError(
message,errorUri?):InvalidScopeError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='invalid_scope'
Defined in: packages/server-legacy/src/auth/errors.ts:85
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
InvalidTargetError
Defined in: packages/server-legacy/src/auth/errors.ts:170
Invalid target error - The requested resource is invalid, missing, unknown, or malformed. (Custom error for resource indicators - RFC 8707)
Extends
Constructors
Constructor
new InvalidTargetError(
message,errorUri?):InvalidTargetError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='invalid_target'
Defined in: packages/server-legacy/src/auth/errors.ts:171
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
InvalidTokenError
Defined in: packages/server-legacy/src/auth/errors.ts:131
Invalid token error - The access token provided is expired, revoked, malformed, or invalid for other reasons.
Extends
Constructors
Constructor
new InvalidTokenError(
message,errorUri?):InvalidTokenError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='invalid_token'
Defined in: packages/server-legacy/src/auth/errors.ts:132
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
MethodNotAllowedError
Defined in: packages/server-legacy/src/auth/errors.ts:139
Method not allowed error - The HTTP method used is not allowed for this endpoint. (Custom, non-standard error)
Extends
Constructors
Constructor
new MethodNotAllowedError(
message,errorUri?):MethodNotAllowedError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='method_not_allowed'
Defined in: packages/server-legacy/src/auth/errors.ts:140
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
OAuthError
Defined in: packages/server-legacy/src/auth/errors.ts:6
Base class for all OAuth errors
Extends
Error
Extended by
InvalidRequestErrorInvalidClientErrorInvalidGrantErrorUnauthorizedClientErrorUnsupportedGrantTypeErrorInvalidScopeErrorAccessDeniedErrorServerErrorTemporarilyUnavailableErrorUnsupportedResponseTypeErrorUnsupportedTokenTypeErrorInvalidTokenErrorMethodNotAllowedErrorTooManyRequestsErrorInvalidClientMetadataErrorInsufficientScopeErrorInvalidTargetErrorCustomOAuthError
Constructors
Constructor
new OAuthError(
message,errorUri?):OAuthError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Overrides
Error.constructor
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Error.cause
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Error.message
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Error.name
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Error.stack
errorCode
staticerrorCode:string
Defined in: packages/server-legacy/src/auth/errors.ts:7
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Error.stackTraceLimit
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
Error.captureStackTrace
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
Error.isError
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Error.prepareStackTrace
ServerError
Defined in: packages/server-legacy/src/auth/errors.ts:99
Server error - The authorization server encountered an unexpected condition that prevented it from fulfilling the request.
Extends
Constructors
Constructor
new ServerError(
message,errorUri?):ServerError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='server_error'
Defined in: packages/server-legacy/src/auth/errors.ts:100
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
TemporarilyUnavailableError
Defined in: packages/server-legacy/src/auth/errors.ts:107
Temporarily unavailable error - The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
Extends
Constructors
Constructor
new TemporarilyUnavailableError(
message,errorUri?):TemporarilyUnavailableError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='temporarily_unavailable'
Defined in: packages/server-legacy/src/auth/errors.ts:108
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
TooManyRequestsError
Defined in: packages/server-legacy/src/auth/errors.ts:147
Too many requests error - Rate limit exceeded. (Custom, non-standard error based on RFC 6585)
Extends
Constructors
Constructor
new TooManyRequestsError(
message,errorUri?):TooManyRequestsError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='too_many_requests'
Defined in: packages/server-legacy/src/auth/errors.ts:148
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
UnauthorizedClientError
Defined in: packages/server-legacy/src/auth/errors.ts:68
Unauthorized client error - The authenticated client is not authorized to use this authorization grant type.
Extends
Constructors
Constructor
new UnauthorizedClientError(
message,errorUri?):UnauthorizedClientError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='unauthorized_client'
Defined in: packages/server-legacy/src/auth/errors.ts:69
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
UnsupportedGrantTypeError
Defined in: packages/server-legacy/src/auth/errors.ts:76
Unsupported grant type error - The authorization grant type is not supported by the authorization server.
Extends
Constructors
Constructor
new UnsupportedGrantTypeError(
message,errorUri?):UnsupportedGrantTypeError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='unsupported_grant_type'
Defined in: packages/server-legacy/src/auth/errors.ts:77
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
UnsupportedResponseTypeError
Defined in: packages/server-legacy/src/auth/errors.ts:115
Unsupported response type error - The authorization server does not support obtaining an authorization code using this method.
Extends
Constructors
Constructor
new UnsupportedResponseTypeError(
message,errorUri?):UnsupportedResponseTypeError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='unsupported_response_type'
Defined in: packages/server-legacy/src/auth/errors.ts:116
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
UnsupportedTokenTypeError
Defined in: packages/server-legacy/src/auth/errors.ts:123
Unsupported token type error - The authorization server does not support the requested token type.
Extends
Constructors
Constructor
new UnsupportedTokenTypeError(
message,errorUri?):UnsupportedTokenTypeError
Defined in: packages/server-legacy/src/auth/errors.ts:9
Parameters
message
string
errorUri?
string
Returns
Inherited from
Properties
cause?
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
errorUri?
readonlyoptionalerrorUri?:string
Defined in: packages/server-legacy/src/auth/errors.ts:11
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
stack?
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
errorCode
staticerrorCode:string='unsupported_token_type'
Defined in: packages/server-legacy/src/auth/errors.ts:124
Overrides
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:68
The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Accessors
errorCode
Get Signature
get errorCode():
string
Defined in: packages/server-legacy/src/auth/errors.ts:33
Returns
string
Inherited from
Methods
toResponseObject()
toResponseObject():
object
Defined in: packages/server-legacy/src/auth/errors.ts:20
Converts the error to a standard OAuth error response object
Returns
object
error
error:
string
error_description?
optionalerror_description?:string
error_uri?
optionalerror_uri?:string
Inherited from
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:52
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.
The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
isError()
staticisError(error):error is Error
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error
Inherited from
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@24.12.0/node_modules/@types/node/globals.d.ts:56
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Variables
OAUTH_ERRORS
constOAUTH_ERRORS:object
Defined in: packages/server-legacy/src/auth/errors.ts:194
A full list of all OAuthErrors, enabling parsing from error responses
Index Signature
[key: string]: typeof InvalidRequestError