In the case of an error, a standard format error response body will be returned and the HTTP status code will be set to an error status.

interface GeolocateResponseError {
    data: {
        error: {
            code: number;
            errors: {
                domain: string;
                message: string;
                reason: GeolocateErrorReason;
            }[];
            message: string;
        };
    };
}

Hierarchy

  • AxiosResponse
    • GeolocateResponseError

Properties

Properties

data: {
    error: {
        code: number;
        errors: {
            domain: string;
            message: string;
            reason: GeolocateErrorReason;
        }[];
        message: string;
    };
}

Type declaration

  • error: {
        code: number;
        errors: {
            domain: string;
            message: string;
            reason: GeolocateErrorReason;
        }[];
        message: string;
    }
    • code: number

      This is the same as the HTTP status of the response.

    • errors: {
          domain: string;
          message: string;
          reason: GeolocateErrorReason;
      }[]

      A list of errors which occurred. Each error contains an identifier for the type of error (the reason) and a short description (the message).

    • message: string

      A short description of the error.