by default an RWSErrorResponse is returned when a request is sent as a PostDataRequest. In case of an error it could be useful to get the attribute ErrorOriginLocation from the class RWSPostErrorResponse.
A patch could be easily applied with a code like that:
if isinstance(request_object, rws_requests.PostDataRequest):
error = rwsobjects.RWSPostErrorResponse(r.text)
errDesc = error.error_client_response_message
else:
error = RWSErrorResponse(r.text)
errDesc = error.errordescription
....
raise RWSException(errDesc, error)
In same time a change could also be done on class RWSPostErrorResponse to harmonize the attribute name reasoncode, to change attribute name reason_code to reasoncode.
Hi RWSLib team,
by default an RWSErrorResponse is returned when a request is sent as a PostDataRequest. In case of an error it could be useful to get the attribute ErrorOriginLocation from the class RWSPostErrorResponse.
A patch could be easily applied with a code like that: if isinstance(request_object, rws_requests.PostDataRequest): error = rwsobjects.RWSPostErrorResponse(r.text) errDesc = error.error_client_response_message else: error = RWSErrorResponse(r.text) errDesc = error.errordescription
....
raise RWSException(errDesc, error)
In same time a change could also be done on class RWSPostErrorResponse to harmonize the attribute name reasoncode, to change attribute name reason_code to reasoncode.
Thanks in advance for your support.
Kind regards, Joel.