prorm API Reference
    Preparing search index...

    Class ConnectionError

    Error for database connection issues

    Hierarchy (View Summary)

    Index
    • Parameters

      • message: string = 'Unable to connect to database'
      • options: {
            code?: ErrorCode;
            parent?: Error;
            database?: string;
            host?: string;
            sql?: string;
        } = {}

      Returns ConnectionError

    code: ErrorCode

    Unique error code for programmatic handling

    parent?: Error

    Original error that caused this error

    sql?: string

    SQL query that caused the error

    metadata?: Record<string, unknown>

    Additional error properties

    database?: string

    The database that was being connected to

    host?: string

    The host that was being connected to

    • Create a connection refused error

      Parameters

      • options: { parent?: Error; database?: string; host?: string } = {}

      Returns ConnectionError

    • Create a connection timeout error

      Parameters

      • options: { parent?: Error; database?: string; host?: string } = {}

      Returns ConnectionError

    • Create a host unreachable error

      Parameters

      • options: { parent?: Error; database?: string; host?: string } = {}

      Returns ConnectionError

    • Create an invalid connection error

      Parameters

      • options: { parent?: Error; database?: string; host?: string } = {}

      Returns ConnectionError