API Errors
The Upvest Investment API uses standard HTTP status codes and RFC9457 error types.
Error payloads
Error payloads have a consistent format, expressing problem details according to RFC9457.
The content-type
for all error messages is application/problem+json
and not application/json
as for all other responses.
Example error response
HTTP/1.1 401 Unauthorized
content-length: 174
content-type: application/problem+json
date: Mon, 11 Oct 2021 10:42:01 GMT
upvest-request-id: afcd3c2f-6965-4e1b-bb3e-87a3b481ce29
{
"detail": "Signature is incorrect",
"request_id": "afcd3c2f-6965-4e1b-bb3e-87a3b481ce29",
"status": 401,
"title": "Unauthorised",
"type": "https://docs.upvest.co/errors/unauthorised"
}
Error fields
detail
: A human-readable description of the specific error.instance
: This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.request_id
: Correlation ID for the original request.status
: Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.title
: A short, human-readable title for the general error type; the title should not change for given types.type
: URL to a document describing the error condition.
HTTP responses codes
Response codes in the range 2xx indicate a successful response, in the range 4xx a client error and in the range 5xx a server error.
Code | RFC9457 Error Type | Description |
---|---|---|
400 | Bad Request | The request contains some data which format does not conform to one that we expect. Check details value of the response to get additional information. |
400 | Missing Client ID | The upvest-client-id header is missing in the request. |
400 | Missing Idempotency Key | The request you are trying to execute requires idempotency-key in the header of the request. |
401 | Unauthorised | The call can not be authorised. |
403 | Forbidden | The request you are trying to execute requires certain authorisations associated with the access token you pass to the call. |
404 | Not Found | The server cannot find the requested resource. |
406 | Not Acceptable | The server cannot generate a response that matches the list of acceptable values defined in the request's proactive content negotiation headers, also the server is unwilling to provide a default representation. |
409 | Conflict | An operation is not available for the current status of the resource. |
422 | Unprocessable Entity | An entity could not be processed due to a semantic error. |
429 | Too Many Requests | You have sent too many requests in a given amount of time ("rate limiting"). |
500 | Internal Server Error | The call has failed due to an internal problem. Our monitoring system has triggered an alert, and the issue is being investigated and resolved by our engineering team. |
503 | Service Unavailable | The server is not ready to handle the request. |
504 | Gateway Timeout | The server acted as a gateway or proxy and did not receive a timely response from the upstream server. |
In the subchapters you will find the exact error descriptions and possible solutions for the Upvest-specific error types.