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 should return a 404 error to indicate that the requested resource was not found #46

Open
lebaudantoine opened this issue Jul 25, 2023 · 0 comments
Assignees
Labels
Milestone

Comments

@lebaudantoine
Copy link
Contributor

Bug Report

Expected behavior/code
If a video doesn't exist in the LRS endpoints, the API should return a 404 error to indicate that the requested resource was not found.

Actual Behavior
When querying the API with an invalid ID, the API returns a 200 response, which is misleading since it implies that the request was successful even though the resource does not exist.

Steps to Reproduce

  1. Query API route /api/v1/video/uuid://fake-uuid/downloads
  2. Read response's status code.

Environment

  • Ralph version: 3.8

Possible Solution

When a request with an invalid ID is received, the API should be modified to return a 404 (Not Found) error, indicating that the video resource does not exist. This check would use future elements from Ralph related to some current works on activities. Once Ralph provides a method to verify resource existence, consider consolidating Warren's API.

Additional context/Screenshots
None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

3 participants