Skip to content

fix(gateway): return error instead of nil for unknown filter in EthGetFilterLogs#13519

Merged
rvagg merged 5 commits intofilecoin-project:masterfrom
sudo-shashank:shashank/fix-gateway-error-handler
Feb 23, 2026
Merged

fix(gateway): return error instead of nil for unknown filter in EthGetFilterLogs#13519
rvagg merged 5 commits intofilecoin-project:masterfrom
sudo-shashank:shashank/fix-gateway-error-handler

Conversation

@sudo-shashank
Copy link
Copy Markdown
Contributor

@sudo-shashank sudo-shashank commented Feb 17, 2026

Related Issues

ChainSafe/forest#6580

Proposed Changes

  • Return ErrFilterNotFound instead of nil when filter not found in EthGetFilterLogs for both v1 and v2 gateway proxies.

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

@github-project-automation github-project-automation Bot moved this to 📌 Triage in FilOz Feb 17, 2026
@sudo-shashank sudo-shashank changed the title fix(gateway): handle missing filters in EthGetFilterLogs fix(gateway): handle filter not found in EthGetFilterLogs Feb 17, 2026
@sudo-shashank sudo-shashank changed the title fix(gateway): handle filter not found in EthGetFilterLogs fix(gateway): return ErrFilterNotFound in EthGetFilterLogs V1/V2 proxy Feb 17, 2026
@sudo-shashank sudo-shashank changed the title fix(gateway): return ErrFilterNotFound in EthGetFilterLogs V1/V2 proxy fix(gateway): return ErrFilterNotFound in EthGetFilterLogs V1 and V2 proxies Feb 17, 2026
@sudo-shashank sudo-shashank marked this pull request as ready for review February 17, 2026 10:46
@rjan90 rjan90 requested a review from rvagg February 17, 2026 11:42
@rjan90 rjan90 moved this from 📌 Triage to 🔎 Awaiting Review in FilOz Feb 17, 2026
@rvagg
Copy link
Copy Markdown
Member

rvagg commented Feb 19, 2026

@sudo-shashank have you tried running this and does it get you the results you want? I haven't looked widely and am not sure if error code matters here at all but quicknode's example runner gives me:

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32000,
    "message": "filter not found"
  }
}

@sudo-shashank
Copy link
Copy Markdown
Contributor Author

sudo-shashank commented Feb 19, 2026

@sudo-shashank have you tried running this and does it get you the results you want? I haven't looked widely and am not sure if error code matters here at all but quicknode's example runner gives me:

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32000,
    "message": "filter not found"
  }
}

@rvagg via lotus gateway we don't get filter not found error message if filter id is not found for Filecoin.EthGetFilterLogs, it currently returns nil.
This error is expected and return correctly only for Filecoin.EthGetFilterChanges as implemented here

Comment thread CHANGELOG.md Outdated
@rvagg rvagg changed the title fix(gateway): return ErrFilterNotFound in EthGetFilterLogs V1 and V2 proxies fix(gateway): return error instead of nil for unknown filter in EthGetFilterLogs Feb 23, 2026
@rvagg rvagg enabled auto-merge (squash) February 23, 2026 09:59
Copy link
Copy Markdown
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

with PR (and therefore commit msg) and changelog tweaks applied

@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting Review to ✔️ Approved by reviewer in FilOz Feb 23, 2026
@rvagg rvagg merged commit a793957 into filecoin-project:master Feb 23, 2026
97 checks passed
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FilOz Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

3 participants