prorm API Reference
    Preparing search index...

    Class EagerLoadError

    Error raised when eager-loading an association (include) fails.

    Previously these failures were caught and reported as an empty result, which made a typo'd alias, a missing foreign key column, an unresolvable through model, and a genuinely childless parent indistinguishable. This surfaces the underlying cause while naming the association that could not be loaded.

    Hierarchy (View Summary)

    Index
    • Parameters

      • model: string
      • association: string
      • associationType: string | undefined
      • Optionalparent: unknown

      Returns EagerLoadError

    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

    model: string

    The model the include was declared on

    association: string

    The alias the association would have been attached to

    associationType?: string

    The association type, when one was resolved