Skip to content
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

Send error to client when server fails to serialize response #555

Merged
merged 1 commit into from
Sep 18, 2020

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented Sep 18, 2020

Previous to this change, a failure to serialize a response would lead the server to terminate the connection (since a response is required). With this change, we instead keep the connection going but send an error response to the client with the serialization error.

We also (still) log the serialization failure on the server.

Closes #549

Previous to this change, a failure to serialize a response would lead the server to terminate the connection (since a response is required). With this change, we instead keep the connection going but send an error response to the client with the serialization error.

We also (still) log the serialization failure on the server.

Fixes microsoft#549
@AArnott AArnott added this to the v2.6 milestone Sep 18, 2020
@AArnott AArnott requested review from tmat and javierdlg September 18, 2020 18:09
@AArnott AArnott self-assigned this Sep 18, 2020
@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2020

Codecov Report

Merging #555 into master will increase coverage by 0.06%.
The diff coverage is 96.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #555      +/-   ##
==========================================
+ Coverage   89.83%   89.89%   +0.06%     
==========================================
  Files          54       55       +1     
  Lines        4445     4463      +18     
==========================================
+ Hits         3993     4012      +19     
+ Misses        452      451       -1     
Impacted Files Coverage Δ
src/StreamJsonRpc/Resources.Designer.cs 68.00% <0.00%> (-2.28%) ⬇️
...JsonRpc/Exceptions/RemoteSerializationException.cs 100.00% <100.00%> (ø)
src/StreamJsonRpc/JsonRpc.cs 93.13% <100.00%> (+0.42%) ⬆️
src/StreamJsonRpc/MessageHandlerBase.cs 98.78% <0.00%> (-1.22%) ⬇️
...pc/Reflection/MessageFormatterDuplexPipeTracker.cs 95.40% <0.00%> (+1.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81ee686...18846ae. Read the comment docs.

@AArnott AArnott merged commit 2598621 into microsoft:master Sep 18, 2020
@AArnott AArnott deleted the fix549 branch September 18, 2020 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better handling of failures to serialize RPC method return value
3 participants