While calling the Wicked API endpoint /auth/local/api/search/token with an invalid scope, the response from the client is in HTML format. That is because, if an endpoint is called in a browser (also for example to get a 404), there is a pretty format, being HTML. However, usually the clients are using API REST calls and it would be more suitable to have a JSON response.
One other solution would be to allow configuration of the response type.
Hello,
While calling the Wicked API endpoint
/auth/local/api/search/token
with an invalid scope, the response from the client is in HTML format. That is because, if an endpoint is called in a browser (also for example to get a 404), there is a pretty format, being HTML. However, usually the clients are using API REST calls and it would be more suitable to have a JSON response.One other solution would be to allow configuration of the response type.