Permalink
Browse files

Add http status codes doc

  • Loading branch information...
iandees committed Jul 27, 2017
1 parent b8e7f37 commit 1b88ce76b972b1a449ea234aecddf41c5543de8a
Showing with 17 additions and 0 deletions.
  1. +17 −0 docs/http-status-codes.md
@@ -0,0 +1,17 @@
# HTTP status codes

The following is a list of HTTP status error code conditions that may occur for a particular request.

In general, the service follows the [HTTP specification](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes). That is to say that `5xx` returns are generally ephemeral server problems that should be resolved shortly or are the result of a bug. `4xx` returns are used to mark requests that cannot be carried out, generally due to bad input in the request or problems with the underlying data. `3xx` returns are used to mark requests that are content redirects. A `2xx` return is expected when there is a successful response for a given tile coordinate and file format.

The following status codes are returned from the Mapzen Terrain Tile service:

- `200 OK`: The request has succeeded.
- `304 Not Modified`: Tile hasn't changed since the last time it was requested and there is no need to retransmit the resource since the client still has a previously-downloaded copy.
- `400 Bad Request`: An input parameter was invalid. An error message is included in the response body with more details.
- `403 Forbidden`: The URL is invalid or the path is no longer valid.
- `404 Not Found`: The URL is invalid or the path is no longer valid.
- `429 Too Many Requests`: Rate limiting, refer to Mapzen's [rate limits](https://mapzen.com/documentation/overview/rate-limits/) documentation.
- `500 Internal Server Error`: Generic fatal error.

In the `200 OK` case above, the response body will be valid binary data with the requested tile format. In the other cases the response body will include an error message and the response header will specify the HTML status code.

0 comments on commit 1b88ce7

Please sign in to comment.