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

API returns 200 for non existing endpoints #3005

Open
jkppr opened this issue Dec 12, 2023 · 1 comment
Open

API returns 200 for non existing endpoints #3005

jkppr opened this issue Dec 12, 2023 · 1 comment
Assignees
Labels

Comments

@jkppr
Copy link
Collaborator

jkppr commented Dec 12, 2023

With the default set-up the Timesketch API returns an empty page with status code 200 for API endpoints that do not exist.

Reproduce:

Expected behaviour:

  • When calling an API endpoint that does not exist I would expect an 404 error
@jkppr jkppr added the Bug label Dec 12, 2023
@TedmanNguyen
Copy link
Contributor

Working on this issue

berggren added a commit that referenced this issue May 7, 2024
* added route error handler

* Updating invalid route method with comment, docstring

* Fixed invalid api routes to require login

* implemented invalid route check and unit test

* provided unit test for invalid resources check

* Final commit
Co-authored-by: Devin Delaney <devdeltek@gmail.com>
Co-authored-by: Chynna Syas <chynna.syas@gmail.com>
Co-authored-by: Dustin Phan <dustinnphan@gmail.com>

* Update timesketch/app.py

Co-authored-by: Janosch <99879757+jkppr@users.noreply.github.com>

* Update timesketch/app.py

Co-authored-by: Janosch <99879757+jkppr@users.noreply.github.com>

* Update timesketch/app.py

Co-authored-by: Janosch <99879757+jkppr@users.noreply.github.com>

* Update timesketch/app.py

Co-authored-by: Janosch <99879757+jkppr@users.noreply.github.com>

* Update timesketch/app.py

Co-authored-by: Janosch <99879757+jkppr@users.noreply.github.com>

* Update timesketch/api/v1/resources_test.py

Co-authored-by: Janosch <99879757+jkppr@users.noreply.github.com>

* Update app.py for linter compatibility

* Update resources_test.py for linter compatibility

---------

Co-authored-by: Janosch <99879757+jkppr@users.noreply.github.com>
Co-authored-by: Johan Berggren <jberggren@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants