TimeoutErrorAn error indicating that an operation exceeded its time limit.
Details
Produced by Effect.timeout and related APIs. Implements
YieldableError.
Example (Creating and checking a TimeoutError)
import { Cause } from "effect"
const error = new Cause.TimeoutError("Operation timed out")
console.log(error._tag) // "TimeoutError"
console.log(error.message) // "Operation timed out"errors
Source effect/Cause.ts:145321 lines
export interface TimeoutError extends YieldableError {
readonly [const TimeoutErrorTypeId: "~effect/Cause/TimeoutError"Unique brand for TimeoutError.
TimeoutErrorTypeId]: typeof const TimeoutErrorTypeId: "~effect/Cause/TimeoutError"Unique brand for TimeoutError.
TimeoutErrorTypeId
readonly TimeoutError._tag: "TimeoutError"_tag: "TimeoutError"
}
/**
* Constructs a `TimeoutError` with an optional message.
*
* **Example** (Creating a TimeoutError)
*
* ```ts
* import { Cause } from "effect"
*
* const error = new Cause.TimeoutError("Operation timed out")
* console.log(error.message) // "Operation timed out"
* ```
*
* @category constructors
* @since 4.0.0
*/
export const const TimeoutError: new (
message?: string
) => TimeoutError
An error indicating that an operation exceeded its time limit.
Details
Produced by Effect.timeout and related APIs. Implements
YieldableError.
Example (Creating and checking a TimeoutError)
import { Cause } from "effect"
const error = new Cause.TimeoutError("Operation timed out")
console.log(error._tag) // "TimeoutError"
console.log(error.message) // "Operation timed out"
Constructs a TimeoutError with an optional message.
Example (Creating a TimeoutError)
import { Cause } from "effect"
const error = new Cause.TimeoutError("Operation timed out")
console.log(error.message) // "Operation timed out"
TimeoutError: new(message: string | undefinedmessage?: string) => TimeoutError = import effecteffect.class TimeoutErrorTimeoutErrorReferenced by 2 symbols