Skip to main content
from fal.exceptions import (
    FalServerlessException,
    AppException,
    FieldException,
    RequestCancelledException,
    FileTooLargeError,
    AppFileUploadException,
    CUDAOutOfMemoryException,
    UnauthenticatedException,
)

Classes

FalServerlessException

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

Constructor Parameters

NameTypeDefaultDescription
args---
kwargs---

AppException

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

Constructor Parameters

NameTypeDefaultDescription
messagestr-A descriptive message explaining the error.
status_codeint-The HTTP status code associated with the error.

Class Variables

NameTypeDefaultDescription
messagestr-A descriptive message explaining the error.
status_codeint-The HTTP status code associated with the error.

FieldException

class fal.exceptions.FieldException
Exception raised for errors related to specific fields.
Inherits from: FalServerlessException

Constructor Parameters

NameTypeDefaultDescription
fieldstr-The field that caused the error.
messagestr-A descriptive message explaining the error.
status_codeint422The HTTP status code associated with the error. Defaults to 422
typestr'value_error'The type of error. Defaults to “value_error”
billable_unitsint | float | str | None0-

Class Variables

NameTypeDefaultDescription
fieldstr-The field that caused the error.
messagestr-A descriptive message explaining the error.
status_codeint422The HTTP status code associated with the error. Defaults to 422
typestr'value_error'The type of error. Defaults to “value_error”
billable_unitsint | float | str | None0-

Methods

to_pydantic_format

def to_pydantic_format(self) -> 'dict[str, list[dict]]'
Returns: dict[str, list[dict]]

RequestCancelledException

class fal.exceptions.RequestCancelledException
Exception raised when the request is cancelled by the client.
Inherits from: FalServerlessException

Constructor Parameters

NameTypeDefaultDescription
messagestr'Request cancelled by the client.'-

Class Variables

NameTypeDefaultDescription
messagestr'Request cancelled by the client.'-

FileTooLargeError

class fal.exceptions.FileTooLargeError
Exception raised when the file is too large.
Inherits from: FalServerlessException

Constructor Parameters

NameTypeDefaultDescription
messagestr'File is too large.'-

Class Variables

NameTypeDefaultDescription
messagestr'File is too large.'-

AppFileUploadException

class fal.exceptions.AppFileUploadException
Raised when file upload fails
Inherits from: FalServerlessException

Constructor Parameters

NameTypeDefaultDescription
messagestr--
relative_pathstr--

Class Variables

NameTypeDefaultDescription
messagestr--
relative_pathstr--

CUDAOutOfMemoryException

class fal.exceptions.CUDAOutOfMemoryException
Exception raised when a CUDA operation runs out of memory.
Inherits from: AppException

Constructor Parameters

NameTypeDefaultDescription
messagestr'CUDA error: out of memory'-
status_codeint503-

Class Variables

NameTypeDefaultDescription
messagestr'CUDA error: out of memory'-
status_codeint503-

UnauthenticatedException

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