ReflectionsProjections/mm18

Handle errors in server requests

Closed this issue · 1 comments

The server needs to be able to return non-2** status codes based on errors that happen when trying to hand off to the game_controller or getting a failure from the game controller. This includes:

HTTP 404 -- URL did not match
HTTP 405 -- Valid URL but wrong form of request (e.g. GET instead of POST)
HTTP 401 -- Invalid auth code
HTTP 403 -- Valid auth code but player is not allowed to make request
HTTP 400 -- Valid request but either invalid JSON or JSON lacking attributes needed
HTTP 429 -- Seriously, stop spamming the server

HTTP 500 -- Something went wrong on our end
HTTP 501 -- Return for a method still unimplemented

This is an active process, and @colegleason and @amhendr2 have been working on ensuring that it is done as they write server functions. Closing and moving to wiki.