Dear all,
How can I handle the response code that is not 200?
It seems now throwing an exception for code 500 (internal server error).
Just catch the ApiException and get the status code from that. How you handle a 500 internal server error is too broad a question. We can't possibly know anything about the webservice you are calling.
Usually it means that the webservice failed processing your request due to some error. So maybe retry the call?
Most helpful comment
Just catch the
ApiExceptionand get the status code from that. How you handle a 500 internal server error is too broad a question. We can't possibly know anything about the webservice you are calling.Usually it means that the webservice failed processing your request due to some error. So maybe retry the call?