import { ErrorResponse } from "apollo-link-error"; import { StatusCode } from "./types"; export declare function assertGraphQLUserError(err: ErrorResponse): void; export declare function assertGraphQLCreditsError(err: ErrorResponse): void; export declare function assertGraphQLNetworkError(err: ErrorResponse): void; export declare function assertGraphQLOtherError(err: ErrorResponse): void; export declare function handleGraphQLError(err: ErrorResponse): ErrorResponse; export declare const ERROR_CODES: { NO_BILLING_INFO: { code: number; message: string; }; EMAIL_NOT_VERIFIED: { code: number; message: string; }; MAX_LANGUAGE_COUNT_EXCEEDED: { code: number; message: string; }; MAX_WORD_COUNT_EXCEEDED: { code: number; message: string; }; NO_USER_SUPPLIED: { code: number; message: string; }; INVALID_API_KEY: { code: number; message: string; }; }; /** * given a backend error, find the corresponding frontend error and display * @param error backend error */ export declare function handleError(error: StatusCode): void;