The client's HTTP request accepts application/json, so the server should respond with a json, even in an error case. Currently error cases return simple strings such as "Forbidden". Based on the HTTP request, we should return a json or else the client will throw an error.
The client's HTTP request accepts application/json, so the server should respond with a json, even in an error case. Currently error cases return simple strings such as "Forbidden". Based on the HTTP request, we should return a json or else the client will throw an error.