Skip to content

Commit

Permalink
Merge pull request #22 from kaleido-io/err-detail
Browse files Browse the repository at this point in the history
Add underlying error to FF22012
  • Loading branch information
nguyer authored Aug 30, 2022
2 parents 0dca0a9 + 9f023ca commit 6e97617
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/signermsgs/en_error_messges.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var ffe = func(key, translation string, statusHint ...int) i18n.ErrorMessageKey
var (
MsgInvalidOutputType = ffe("FF22010", "Invalid output type: %s")
MsgInvalidParam = ffe("FF22011", "Invalid parameter at position %d for method %s: %s")
MsgRPCRequestFailed = ffe("FF22012", "Backend RPC request failed")
MsgRPCRequestFailed = ffe("FF22012", "Backend RPC request failed: %s")
MsgReadDirFile = ffe("FF22013", "Directory listing failed")
MsgWalletNotAvailable = ffe("FF22014", "Wallet for address '%s' not available")
MsgWalletFailed = ffe("FF22015", "Wallet for address '%s' could not be initialized")
Expand Down
2 changes: 1 addition & 1 deletion pkg/rpcbackend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (rc *RPCClient) SyncRequest(ctx context.Context, rpcReq *RPCRequest) (rpcRe
// Restore the original ID
rpcRes.ID = rpcReq.ID
if err != nil {
err := i18n.NewError(ctx, signermsgs.MsgRPCRequestFailed)
err := i18n.NewError(ctx, signermsgs.MsgRPCRequestFailed, err)
log.L(ctx).Errorf("RPC[%s] <-- ERROR: %s", rpcTraceID, err)
rpcRes = RPCErrorResponse(err, rpcReq.ID, RPCCodeInternalError)
return rpcRes, err
Expand Down

0 comments on commit 6e97617

Please sign in to comment.