Skip to content

Commit

Permalink
Please the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
daria305 committed Mar 12, 2024
1 parent 41146f0 commit 6a74c6b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/requesthandler/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func (r *RequestHandler) RewardsByOutputID(outputID iotago.OutputID, slot iotago
if ierrors.Is(err, kvstore.ErrKeyNotFound) {
return nil, ierrors.Wrapf(echo.ErrNotFound, "output %s not found", outputID.ToHex())
}

return nil, ierrors.Wrapf(echo.ErrInternalServerError, "failed to get output %s from ledger: %s", outputID.ToHex(), err)
}

Expand Down
1 change: 1 addition & 0 deletions pkg/requesthandler/blocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func (r *RequestHandler) BlockMetadataByBlockID(blockID iotago.BlockID) (*api.Bl
if ierrors.Is(err, kvstore.ErrKeyNotFound) {
return nil, ierrors.Wrapf(echo.ErrNotFound, "block not found: %s", blockID.ToHex())
}

return nil, ierrors.Wrapf(echo.ErrInternalServerError, "failed to get block metadata %s: %s", blockID.ToHex(), err)
}

Expand Down
3 changes: 3 additions & 0 deletions pkg/requesthandler/utxo.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func (r *RequestHandler) OutputFromOutputID(outputID iotago.OutputID) (*api.Outp
if ierrors.Is(err, kvstore.ErrKeyNotFound) {
return nil, ierrors.Wrapf(echo.ErrNotFound, "output %s not found in the Ledger", outputID.ToHex())
}

return nil, ierrors.Wrapf(echo.ErrInternalServerError, "failed to get output %s from the Ledger: %s", outputID.ToHex(), err)
}

Expand All @@ -31,6 +32,7 @@ func (r *RequestHandler) OutputMetadataFromOutputID(outputID iotago.OutputID) (*
if ierrors.Is(err, kvstore.ErrKeyNotFound) {
return nil, ierrors.Wrapf(echo.ErrNotFound, "output %s not found in the Ledger", outputID.ToHex())
}

return nil, ierrors.Wrapf(echo.ErrInternalServerError, "failed to get output %s from the Ledger: %s", outputID.ToHex(), err)
}

Expand All @@ -47,6 +49,7 @@ func (r *RequestHandler) OutputWithMetadataFromOutputID(outputID iotago.OutputID
if ierrors.Is(err, kvstore.ErrKeyNotFound) {
return nil, ierrors.Wrapf(echo.ErrNotFound, "output %s not found in the Ledger", outputID.ToHex())
}

return nil, ierrors.Wrapf(echo.ErrInternalServerError, "failed to get output %s from the Ledger: %s", outputID.ToHex(), err)
}

Expand Down

0 comments on commit 6a74c6b

Please sign in to comment.