Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gagliardetto committed Feb 20, 2024
1 parent 410bebb commit 69edfd4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions multiepoch-getTransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ func (multi *MultiEpoch) handleGetTransaction(ctx context.Context, conn *request
epochNumber, err := multi.findEpochNumberFromSignature(ctx, sig)
if err != nil {
if errors.Is(err, ErrNotFound) {
// TODO: solana just returns null here in case of transaction not found: {"jsonrpc":"2.0","result":null,"id":1}
return &jsonrpc2.Error{
Code: CodeNotFound,
Message: "Signature not found",
Message: "Transaction not found",
}, fmt.Errorf("failed to find epoch number from signature %s: %v", sig, err)
}
return &jsonrpc2.Error{
Expand All @@ -156,7 +157,7 @@ func (multi *MultiEpoch) handleGetTransaction(ctx context.Context, conn *request
transactionNode, transactionCid, err := epochHandler.GetTransaction(WithSubrapghPrefetch(ctx, true), sig)
if err != nil {
if errors.Is(err, compactindexsized.ErrNotFound) {
// NOTE: solana just returns null here in case of transaction not found
// NOTE: solana just returns null here in case of transaction not found: {"jsonrpc":"2.0","result":null,"id":1}
return &jsonrpc2.Error{
Code: CodeNotFound,
Message: "Transaction not found",
Expand Down

0 comments on commit 69edfd4

Please sign in to comment.