Skip to content

Commit

Permalink
dispatcher: improve error responses
Browse files Browse the repository at this point in the history
  • Loading branch information
jazg committed Oct 16, 2020
1 parent c3f7c99 commit 635df8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dispatcher/iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (iter firstResponseIterator) Collect(id interface{}, cancel context.CancelF

// Failed to get a valid response from any of the nodes (rare).
if most == nil {
jsonErr := jsonrpc.NewError(jsonrpc.ErrorCodeInternal, "network is down", nil)
jsonErr := jsonrpc.NewError(jsonrpc.ErrorCodeInternal, "unable to query the network", nil)
return jsonrpc.NewResponse(id, nil, &jsonErr)
}

Expand Down Expand Up @@ -77,7 +77,7 @@ func (iter majorityResponseIterator) Collect(id interface{}, cancel context.Canc

// Failed to get a valid response from any of the nodes (rare).
if most == nil {
jsonErr := jsonrpc.NewError(jsonrpc.ErrorCodeInternal, "network is down", nil)
jsonErr := jsonrpc.NewError(jsonrpc.ErrorCodeInternal, "unable to query the network", nil)
return jsonrpc.NewResponse(id, nil, &jsonErr)
}

Expand Down

0 comments on commit 635df8f

Please sign in to comment.