Handle exception with JSON errors