This commit removes custom ProtocolError protobuffer message that was previously a part of our Message message type for reporting non-grpc related errors that can occur during the execution of interactive protocols.
Instead, when a protocol error happens, we simply return the error with return status.Error(<code>, <messageA>) from the RPC handler, which is a standard way of reporting RPC errors to clients. According to grpc status package docs, all RPC handlers should return an error created by this package.
As a consequence, client's send and server's receive functions are simplified, because there's no need for additional logic that catches ProtocolErrors, as they are now reported as normal errors. This change also affects pseudonym system communication logic, which is now also simplified in several places.
This commit removes custom
ProtocolError
protobuffer message that was previously a part of ourMessage
message type for reporting non-grpc related errors that can occur during the execution of interactive protocols.Instead, when a protocol error happens, we simply return the error with
return status.Error(<code>, <messageA>)
from the RPC handler, which is a standard way of reporting RPC errors to clients. According to grpc status package docs, all RPC handlers should return an error created by this package.As a consequence, client's
send
and server'sreceive
functions are simplified, because there's no need for additional logic that catchesProtocolError
s, as they are now reported as normalerror
s. This change also affects pseudonym system communication logic, which is now also simplified in several places.