Filters for error json response and logging.