Adding JSON error response handler.
Changing to use JsonErrorResponse class.