prorm API Reference
    Preparing search index...

    Class EmptyResultError

    Error when no results are found but results were expected

    Hierarchy (View Summary)

    Index
    • Parameters

      • message: string = 'No results found'
      • options: {
            model?: string;
            primaryKey?: unknown;
            where?: Record<string, unknown>;
            parent?: Error;
        } = {}

      Returns EmptyResultError

    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 that was queried

    primaryKey?: unknown

    The primary key value that was searched for

    where?: Record<string, unknown>

    The where clause that was used

    • Get a descriptive message for the error

      Returns string