Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

api: an unknown last_dag_run_state filter answers 500 instead of 400

Closed Beginner friendly
#2,202 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #2211 by @neochaotic — merged

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go, postgresql
Domain
api, backend

Research direction

Start with parseDagRunFilter and trace how last_dag_run_state reaches the enum cast in internal/storage/repo_dags.go; check how the public API and UI list pass the filter through in internal/api/resources.go and internal/api/ui_dags.go. Validate against the run states and return HTTP 400 for an unknown value, as date parsing already does. Done means an unknown filter no longer produces HTTP 500 and the valid run states still work.

Written by the indexing model from the issue text.

Description

GET /api/v2/dags?last_dag_run_state=<unknown value> answers 500 internal error on v0.5.7-rc.1:

{"type":"about:blank","title":"internal error","status":500,"detail":"the request could not be completed; see the server logs","instance":"/api/v2/dags"}

The raw value is cast to the dag_run_state enum in internal/storage/repo_dags.go and Postgres refuses the cast. The public GET /api/v2/dags (internal/api/resources.go) and the UI list (internal/api/ui_dags.go) both pass it through. Nothing leaks, but a client mistake shows up as a server fault and counts toward the 5xx alert.

Validate the value against the run states and answer 400, the way parseDagRunFilter already does for dates.

From the v0.5.7-rc.1 security review (F4 in rc1-security-review.md, #2199), reproduced on the published rc.1 binary.


Generated by Claude Code

Dominant language
Go
Stars
46
Forks
1
Avg merge
13h 9m
Merged PRs (30d)
686

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dexadata/dexaflow

All issues in dexadata/dexaflow

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.