Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions utils/data_channel_rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ func (e *DataChannelRpcError) PsrpcError() psrpc.Error {
case DataChannelRpcApplicationError:
return psrpc.NewErrorf(psrpc.Internal, e.Message, "data", e.Data)
case DataChannelRpcConnectionTimeout:
return psrpc.NewErrorf(psrpc.DeadlineExceeded, e.Message, "data", e.Data)
return psrpc.NewErrorf(psrpc.Canceled, e.Message, "data", e.Data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these args don't make sense for errorf (args 1...n are sprintf template and args for the error message)

case DataChannelRpcResponseTimeout:
return psrpc.NewErrorf(psrpc.DeadlineExceeded, e.Message, "data", e.Data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does that translate to API error? Feels like DeadlineExceeded is the right one and that will translate to Timeout

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"error": "twirp error cancelled: twirp error unknown: Response timeout%!

return psrpc.NewErrorf(psrpc.Canceled, e.Message, "data", e.Data)
case DataChannelRpcRecipientDisconnected:
return psrpc.NewErrorf(psrpc.Unavailable, e.Message, "data", e.Data)
case DataChannelRpcResponsePayloadTooLarge:
Expand Down
Loading