You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above prints out <nil>. I would expect the body writer error to cause WriteTo to return an error, resulting in the program outputting failed! or a wrapped version of it. Right now, there is no indication that an error occurred.
Screenshots
No response
Attempted Fixes
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
The error handling in the msgWriter.writeBody() method was not working properly. We basically overwrote the mw.err with nil if the function that followed after a failed write attempt was successful again
This patch fixes#81
Description
If you set a body writer with
SetBodyWriter
and the writer fails with an error,(*Msg).WriteTo
will not return an error itself.To Reproduce
Run:
Expected behaviour
The above prints out
<nil>
. I would expect the body writer error to causeWriteTo
to return an error, resulting in the program outputtingfailed!
or a wrapped version of it. Right now, there is no indication that an error occurred.Screenshots
No response
Attempted Fixes
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: