-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return error from twirp.WriteError #201
Comments
You're right that it won't break most code. The only exception would be that the function's type changes, so if someone has a It's a bit of a violation of semver to make this part of a minor release, but I think it might be a forgivable one. |
Oh, and in case it isn't obvious - yes, it should return an error if it fails to write. |
Moving discussion from the PR as @spenczar requested.
Recap:
Current implementation of
twirp.WriteError
does not return any error occurred while writing the TwirpError.Humor
WriteError does not return the error if an error occurs while writing the error.
Since the public API currently returns nothing, all existing code looks like
As no return is being processed, adding a return to this method will not break existing code.
The text was updated successfully, but these errors were encountered: