aspnetcore
aspnetcore copied to clipboard
[release/7.0] [TS Client] Fix CompletionMessage result when passing false or null
Backport of #45169 to release/7.0
/cc @BrennanConroy
[TS Client] Fix CompletionMessage result when passing false or null
Description
Returning false or "" or 0 would result in an unexpected exception on the server which the user would need to handle, instead it should give the value to the user code.
Fixes #45168
Customer Impact
Customer reported issue. This has been a bug forever, but it hasn't surfaced until now because it's only likely to show up when sending false from the client side in a streaming method, which is very unusual. It's now a lot easier to return a false value due to the "Client results" feature introduced in 7.0, so we should fix the problem in a 7.0 patch.
Regression?
- [ ] Yes
- [x] No
Risk
- [ ] High
- [ ] Medium
- [x] Low
Small fix and well understood, just an oversight and missed test coverage which are now resolved.
Verification
- [ ] Manual (required)
- [x] Automated
Packaging changes reviewed?
- [ ] Yes
- [ ] No
- [x] N/A
Hi @github-actions[bot]. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge.
To learn more about how to prepare a servicing PR click here.
Hi @github-actions[bot]. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed.
Servicing approved over email. @dotnet/aspnet-build please merge 😃