bgmulinari / B1SLayer

A lightweight SAP Business One Service Layer client for .NET
MIT License
122 stars 42 forks source link

Enriching SLException with HTTP error data #73

Closed EricWu91 closed 1 month ago

EricWu91 commented 1 month ago

Hi, Bruno.

Can I suggest that SLException be enriched with HTTP error data? I'd like to know things like the status code, and the received body.

I know these data are provided by the FlurlHttpException. Can I create a PR with the suggested changes?

bgmulinari commented 1 month ago

Hi, @EricWu91.

With the current implementation, the InnerException of a SLException will always be a FlurlHttpException. Do you have something different in mind?

EricWu91 commented 1 month ago

You're absolutely correct. That's all I'll need for now. Thanks for pointing that out!