Developer Hub

Let's build health apps together that do good at scale

Get Started

API Error Handling

Reference information about the status codes and error messages that are used in HealthTap Cloud APIs.

Error Response Format

HealthTap Cloud uses the standard HTTP error-reporting format for the JSON API. Successful requests return HTTP status codes in the 2xx range. Failed requests return status codes in the 4xx and 5xx ranges. Error responses usually include a JSON document in the response body, which contains information about the error.

The following table describes the elements that can appear in the response body of an error. Fields should be used together to help determine the problem. Also, the example values given below are meant for illustration and are not an exhaustive list of all possible values.

Element Description
code An HTTP status code value, without the textual description. Example values include: 400 (Bad Request), 401 (Unauthorized), and 404 (Not Found)
error A container for the error information.
domain The scope of the error.
reason Example values include invalid, invalidParameter, and required.
message Description of the error.
subcode Sub error code

HTTP Status and Error Codes

This section provides a non-exhaustive list of HTTP status and error codes that the Cloud Storage JSON API uses. The 1xx Informational and 2xx Success codes are not discussed here.

400: Bad Request

Subcode Description
101 Invalid parameter

401: Unauthorized

Subcode Description
101 Invalid client
102 Unverified application

403: Forbidden

Subcode Description
100 The current user does not have access to perform the requested action

404: Not Found

Subcode Description
100 Not Found

500: Internal Server Error

Subcode Description
100 Internal server error

API Error Handling

Reference information about the status codes and error messages that are used in HealthTap Cloud APIs.