Non JSON response encountered

Hi, despite sending the header:
accept: 'application/json
when making requests, if i make a request for a resource which the authenticated user does not have access to i receive a text response with a body of:
“You are not allowed to access this action.”
The Status Code is 403 and the ContentType header is: text/html; charset=utf-8

Other errors that i have encountered are in JSON format with a structure of errors > error > message
It would be helpful if as well as being in JSON format the error indicated the required permission level.

Thanks!