QueryFailure: QueryInfo & {
    error: {
        abort?: QueryValue;
        code: string;
        constraint_failures?: ConstraintFailure[];
        message: string;
    };
}

A decoded response from a failed query to Fauna. Integrations which only want to report a human readable version of the failure can simply print out the "summary" field.

Type declaration

  • error: {
        abort?: QueryValue;
        code: string;
        constraint_failures?: ConstraintFailure[];
        message: string;
    }

    The result of the query resulting in

    • Optionalabort?: QueryValue

      The user provided value passed to the originating abort() call. Present only when the query encountered an abort() call, which is denoted by the error code "abort"

    • code: string

      A predefined code which indicates the type of error. See XXX for a list of error codes.

    • Optionalconstraint_failures?: ConstraintFailure[]

      A machine readable description of any constraint failures encountered by the query. Present only if this query encountered constraint failures.

    • message: string

      A short, human readable description of the error