Job Components: `Index TS Error`
index.TSError
A custom Error class with additional properties, like statusCode and fatalError
Hierarchy
Error
↳
TSError
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new TSError(input
, config?
): TSError
Parameters
Name | Type |
---|---|
input | unknown |
config? | TSErrorConfig |
Returns
Overrides
Error.constructor
Defined in
packages/utils/dist/src/errors.d.ts:32
Properties
code
• code: string
An descriptive error code that specifies the error type, this follows more node convention
Defined in
packages/utils/dist/src/errors.d.ts:12
context
• context: TSErrorContext
Additional context metadata
Defined in
packages/utils/dist/src/errors.d.ts:30
fatalError
• fatalError: boolean
Used to indicate the an error is fatal
Defined in
packages/utils/dist/src/errors.d.ts:20
retryable
• Optional
retryable: boolean
Used sometimes to indicate whether an error is retryable
If this is not set then it is better not to assume either way
Defined in
packages/utils/dist/src/errors.d.ts:26
statusCode
• statusCode: number
A HTTP status code for easy use
Defined in
packages/utils/dist/src/errors.d.ts:16
Methods
getCause
▸ getCause(): any
Returns
any
Defined in
packages/utils/dist/src/errors.d.ts:33
[hasInstance]
▸ [hasInstance](_instance
): boolean
Parameters
Name | Type |
---|---|
_instance | unknown |
Returns
boolean
Defined in
packages/utils/dist/src/errors.d.ts:31