DOMException
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:23
An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DOMException(
message?
,name?
):DOMException
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:24
Parameters
Section titled “Parameters”message?
Section titled “message?”string
string
Returns
Section titled “Returns”DOMException
Overrides
Section titled “Overrides”Error.constructor
Properties
Section titled “Properties”cause?
Section titled “cause?”
optional
cause:unknown
Defined in: node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”Error.cause
readonly
code:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:34
message
Section titled “message”
readonly
message:string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:26
Overrides
Section titled “Overrides”Error.message
readonly
name:string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:28
Overrides
Section titled “Overrides”Error.name
ABORT_ERR
Section titled “ABORT_ERR”
readonly
static
ABORT_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:54
DATA_CLONE_ERR
Section titled “DATA_CLONE_ERR”
readonly
static
DATA_CLONE_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:59
DOMSTRING_SIZE_ERR
Section titled “DOMSTRING_SIZE_ERR”
readonly
static
DOMSTRING_SIZE_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:36
HIERARCHY_REQUEST_ERR
Section titled “HIERARCHY_REQUEST_ERR”
readonly
static
HIERARCHY_REQUEST_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:37
INDEX_SIZE_ERR
Section titled “INDEX_SIZE_ERR”
readonly
static
INDEX_SIZE_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:35
INUSE_ATTRIBUTE_ERR
Section titled “INUSE_ATTRIBUTE_ERR”
readonly
static
INUSE_ATTRIBUTE_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:44
INVALID_ACCESS_ERR
Section titled “INVALID_ACCESS_ERR”
readonly
static
INVALID_ACCESS_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:49
INVALID_CHARACTER_ERR
Section titled “INVALID_CHARACTER_ERR”
readonly
static
INVALID_CHARACTER_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:39
INVALID_MODIFICATION_ERR
Section titled “INVALID_MODIFICATION_ERR”
readonly
static
INVALID_MODIFICATION_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:47
INVALID_NODE_TYPE_ERR
Section titled “INVALID_NODE_TYPE_ERR”
readonly
static
INVALID_NODE_TYPE_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:58
INVALID_STATE_ERR
Section titled “INVALID_STATE_ERR”
readonly
static
INVALID_STATE_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:45
NAMESPACE_ERR
Section titled “NAMESPACE_ERR”
readonly
static
NAMESPACE_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:48
NETWORK_ERR
Section titled “NETWORK_ERR”
readonly
static
NETWORK_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:53
NO_DATA_ALLOWED_ERR
Section titled “NO_DATA_ALLOWED_ERR”
readonly
static
NO_DATA_ALLOWED_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:40
NO_MODIFICATION_ALLOWED_ERR
Section titled “NO_MODIFICATION_ALLOWED_ERR”
readonly
static
NO_MODIFICATION_ALLOWED_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:41
NOT_FOUND_ERR
Section titled “NOT_FOUND_ERR”
readonly
static
NOT_FOUND_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:42
NOT_SUPPORTED_ERR
Section titled “NOT_SUPPORTED_ERR”
readonly
static
NOT_SUPPORTED_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:43
QUOTA_EXCEEDED_ERR
Section titled “QUOTA_EXCEEDED_ERR”
readonly
static
QUOTA_EXCEEDED_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:56
SECURITY_ERR
Section titled “SECURITY_ERR”
readonly
static
SECURITY_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:52
stackTraceLimit
Section titled “stackTraceLimit”
static
stackTraceLimit:number
Defined in: node_modules/.pnpm/@types+node@24.2.0/node_modules/@types/node/globals.d.ts:162
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
Section titled “Inherited from”Error.stackTraceLimit
SYNTAX_ERR
Section titled “SYNTAX_ERR”
readonly
static
SYNTAX_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:46
TIMEOUT_ERR
Section titled “TIMEOUT_ERR”
readonly
static
TIMEOUT_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:57
TYPE_MISMATCH_ERR
Section titled “TYPE_MISMATCH_ERR”
readonly
static
TYPE_MISMATCH_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:51
URL_MISMATCH_ERR
Section titled “URL_MISMATCH_ERR”
readonly
static
URL_MISMATCH_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:55
VALIDATION_ERR
Section titled “VALIDATION_ERR”
readonly
static
VALIDATION_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:50
WRONG_DOCUMENT_ERR
Section titled “WRONG_DOCUMENT_ERR”
readonly
static
WRONG_DOCUMENT_ERR:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:38
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get stack():
any
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:60
Returns
Section titled “Returns”any
Set Signature
Section titled “Set Signature”set stack(
value
):void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:61
Parameters
Section titled “Parameters”any
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”Error.stack
Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
static
captureStackTrace(targetObject
,constructorOpt?
):void
Defined in: node_modules/.pnpm/@types+node@24.2.0/node_modules/@types/node/globals.d.ts:146
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
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Error.captureStackTrace
prepareStackTrace()
Section titled “prepareStackTrace()”
static
prepareStackTrace(err
,stackTraces
):any
Defined in: node_modules/.pnpm/@types+node@24.2.0/node_modules/@types/node/globals.d.ts:150
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite
[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”Error.prepareStackTrace