Skip to main content

Classes

FalServerlessException

Base exception type for fal Serverless related flows and APIs.
Inherits from: Exception

Constructor Parameters

AppException

Base exception class for application-specific errors.
Inherits from: FalServerlessException

Constructor Parameters

Class Variables

FieldException

Exception raised for errors related to specific fields.
Inherits from: FalServerlessException

Constructor Parameters

Class Variables

Methods

to_pydantic_format

Returns: dict[str, list[dict]]

RequestCancelledException

Exception raised when the request is cancelled by the client.
Inherits from: FalServerlessException

Constructor Parameters

Class Variables

FileTooLargeError

Exception raised when the file is too large.
Inherits from: FalServerlessException

Constructor Parameters

Class Variables

AppFileUploadException

Raised when file upload fails
Inherits from: FalServerlessException

Constructor Parameters

Class Variables

GPUException

Base exception for GPU-related errors.
Inherits from: AppException

Constructor Parameters

Class Variables

GPUOutOfMemoryException

Exception raised when a GPU operation runs out of memory.
Inherits from: GPUException

Constructor Parameters

CUDAOutOfMemoryException

Exception raised when a CUDA operation runs out of memory.
Inherits from: GPUOutOfMemoryException

Constructor Parameters

Class Variables

UnauthenticatedException

Base exception type for fal Serverless related flows and APIs.
Inherits from: FalServerlessException

catch_gpu_exceptions

Catch GPU/CUDA exceptions and convert them to HTTP 503 responses. Works as both a context manager and a decorator. Any caught GPU exception (CUDA OOM, cuDNN errors, NVML failures, etc.) is re-raised as a GPU exception with HTTP status 503. Example:
Inherits from: ContextDecorator

Constructor Parameters