SemoxyMC / Server

The backend code for Semoxy
GNU General Public License v3.0
0 stars 0 forks source link

Consequent API Responses #13

Closed xImAnton closed 3 years ago

xImAnton commented 3 years ago

Add more functions around semoxy.util:json_response that generate consequent API Responses and Errors.

A request contains a json payload that is endpoint-specific.

A successful response can have an endpoint-specific format.

A response on failed request should look like this:

{
  "error": {
    "info": "short error description",
    "description": "long error description"
  }
}