Proposal: Allocator service to return 400+ http status for failure #1040
Labels
area/user-experience
Pertaining to developers trying to use Agones, e.g. SDK, installation, etc
kind/breaking
Breaking change
kind/design
Proposal discussing new features / fixes and how they should be implemented
kind/feature
New features for Agones
Milestone
Is your feature request related to a problem? Please describe.
When allocating a game server, if there is an issue that the game server cannot be allocated, the allocator service response is 200 http status with the state of either "unallocated" or "contention". For a RESTful API, the http status represents the status of the result and receiving 200 for an unsuccessful response is contradicting. In kubernetes world, status is a good representation of the state of a CRD, but this is not be the standard for REST APIs.
Describe the solution you'd like
The allocation REST API should return a meaningful http status in case of failure instead of 200. My proposal is to return 429 http status (ResourceExhausted grpc code) for unallocated state and 409 for contention.
The text was updated successfully, but these errors were encountered: