Error Handling in Gyxi

Gyxi returns sensible HTTP codes that represent what they mean.

OK (200)

Gyxi does not return any ‘tricky’ response codes, such as 201 or 204. Instead we employ a simple model where 200 OK means that everything went as planned. Easy.

Not Found (404)

404 means the item was not found and is most frequently seen in Get.

As a special service, 404 is also returned from the Delete endpoint if the item did not exist. It is up to you whether to consider that as an error in your application.

Service Unavailable (503)

The one code that you really should handle explicitly is 503.

Gyxi gets throttled very little compared to other services such as Cosmos DB. However, to secure satisfactory performance for everyone, it is possible that you will from time to time experience throttling.

At the time of writing this, there were more than 20,000 calls to Save in the last minute across the Gyxi platform. 3 of those calls resulted in a 503 response. It is rare that you receive 503 but it happens. So it is important for you to know how to react on those.

503 is not a functional error. It is by definition a temporary error. If you want your call to go through, simply call again. We suggest waiting 5 seconds, but you are welcome to call as fast as you wish.

If you want your application to be “Always fast” (like Gyxi) then you should respond with 503 to your frontend and then the frontend will automatically or by user interaction repeat the call to the server.

Bad Request (400) or Internal Server Error (500)

These codes both mean that something in the request (400) or the data (500) was wrong or unexpected. This is likely a logical error.

Check your request, especially your type, partition and id. Check that your json is valid.