Make the error as JSON and bit less sexy looking.