tiaguinho/gosoap

Differentiate fault and response unmarshal error

AjithPanneerselvam opened this issue · 0 comments

In the current implementation, the response unmarhsal error is not differentiating the fault error and the response unmarshal error. Both errors are technically different. The client should be able to differentiate both the error to take action based on the type of the error.

Unmarhsal error:

expected element type <IngetResponse> but have <IngestResponse>

Fault error:

[soap:Server]: Qube.Mama.SoapException: The remote server returned an error: (550) File unavailable (e.g., file not found, no access).
The remote server returned an error: (550) File unavailable (e.g., file not found, no access).

Code Reference: https://github.com/tiaguinho/gosoap/blob/master/response.go#L16