Skip to content

Type Alias: ValifetchErrorOptions ​

ValifetchErrorOptions = object

Defined in: src/errors/ValifetchError.ts:19

Options for creating a ValifetchError

Properties ​

cause? ​

optional cause?: unknown

Defined in: src/errors/ValifetchError.ts:35

Original error cause. Typed as unknown to match the standard Error.cause, so any thrown value (not just an Error) can be passed through without wrapping.


code ​

code: ErrorCode

Defined in: src/errors/ValifetchError.ts:23

Error code for pattern matching


message ​

message: string

Defined in: src/errors/ValifetchError.ts:21

Error message


request? ​

optional request?: Request

Defined in: src/errors/ValifetchError.ts:25

HTTP request that caused the error


response? ​

optional response?: Response

Defined in: src/errors/ValifetchError.ts:27

HTTP response (if received)


responseBody? ​

optional responseBody?: unknown

Defined in: src/errors/ValifetchError.ts:42

Parsed response body on HTTP_ERROR (JSON-parsed object/array, or plain text when the body is not valid JSON) and raw text on PARSE_ERROR (the response body that failed to parse as JSON). undefined when the body could not be read at all.


validation? ​

optional validation?: ValidationErrorInfo

Defined in: src/errors/ValifetchError.ts:29

Validation error details (if validation failed)

Released under the MIT License. Built with Claude Code.