@hungr/types
    Preparing search index...

    Type Alias ErrorResponse

    ErrorResponse: {
        error: {
            code:
                | "VALIDATION_ERROR"
                | "UNAUTHENTICATED"
                | "FORBIDDEN"
                | "NOT_FOUND"
                | "CONFLICT"
                | "INTERNAL";
            message: string;
            details?: unknown;
        };
    }

    Body of every error response.

    Type Declaration

    • error: {
          code:
              | "VALIDATION_ERROR"
              | "UNAUTHENTICATED"
              | "FORBIDDEN"
              | "NOT_FOUND"
              | "CONFLICT"
              | "INTERNAL";
          message: string;
          details?: unknown;
      }

      What went wrong.

      • code:
            | "VALIDATION_ERROR"
            | "UNAUTHENTICATED"
            | "FORBIDDEN"
            | "NOT_FOUND"
            | "CONFLICT"
            | "INTERNAL"

        Machine-readable error code. VALIDATION_ERROR is 400, UNAUTHENTICATED 401, FORBIDDEN 403, NOT_FOUND 404, CONFLICT 409 and INTERNAL 500.

      • message: string

        Human-readable explanation of the error.

      • Optionaldetails?: unknown

        Extra information about the error. For VALIDATION_ERROR, the list of Zod issues.