SafetyCulture / grpc-web-devtools

Chrome & Firefox Browser extension to aid gRPC-Web development
MIT License
405 stars 51 forks source link

[WB-1999] Fix stream error catching #177

Closed treelite closed 2 months ago

treelite commented 2 months ago

Summary

When the stream request got rejected, for example it's cancelled by user, the req.message does not have the toJson method, caused one unrelated exception went to the error handler of API call, eventually we cannot consume the original error(like the AbortError) correctly.

This PR marked the toJson as optional to skip calling a undefined method.

Pros/cons of approach implemented

Checklist


Code Review Guidelines for Reviewers