The Tanzu Service Mesh API returns standard HTTP status codes for requests. If a request fails because of an error, the error message is included in the response in JSON format.

HTTP Status Codes

The following table provides a summary of the HTTP status codes that the Tanzu Service Mesh API returns.

Status Code

Description

2xx (Success)

Successful request. For example, if the request is made to POST https://{server_name}/tsm/v1alpha2/projects/default/global-namespaces to create a global namespace, the API returns a code of 200 if the global namespace was successfully created.

3xx (Redirection)

The API returns a 3xx code if a client must take additional action to complete the request. For example, the API returns a code of 303 if the response to the request can be found under another URI using the GET method.

4xx (Client errors)

Request fails because of an error caused by the client. For example, if a request is made to PUT https://{server_name}/tsm/v1alpha2/clusters/{clusterID}/apps/{appId} to update an application on a cluster and the specified cluster is not found, the API returns a 4o4 code.

The message property in the response contains a message that provides details about the error.

5xx (Server errors)

The server failed to perform a request. For example, the API returns a 503 code if the server cannot currently process a request because it is temporarily overloaded or is down for maintenance.

The message property in the response contains a message that provides details about the error.