Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: returned 404 if feed does not exist #629

Conversation

jcpitre
Copy link
Contributor

@jcpitre jcpitre commented Jul 23, 2024

Summary:
Closes #600

Applies to /v1/gtfs_feeds/{id}/datasets endpoint
Checked for the existence of a feed before trying to extract its datasets.

Expected behavior:

If the feed does not exist it should return 404
If the feed does exist but has no datasets, it should return 200 with an empty list.

Testing tips:

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@jcpitre jcpitre merged commit 6d170bc into main Jul 23, 2024
3 checks passed
@jcpitre jcpitre deleted the 600-testing-with-a-non-existing-feed-id-results-in-an-empty-array-instead-of-a-http-404-response branch July 23, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testing with a non-existing feed id results in an empty array instead of a HTTP 404 response
2 participants