mdsol / rwslib

Provide a (programmer) friendly client library to Rave Web Services (RWS).
MIT License
31 stars 13 forks source link

RWSPostErrorResponse not returned in send_request #106

Closed JLetrange closed 3 years ago

JLetrange commented 4 years ago

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.