Skip to content

API should return a 404 error to indicate that the requested resource was not found #46

Open
@lebaudantoine

Description

@lebaudantoine

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.

Metadata

Metadata

Labels

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions