polito / api-spec

5 stars 0 forks source link

Wrong docs / unexpected API behavior #17

Closed rebuglio closed 1 year ago

rebuglio commented 1 year ago

The endpoint https://app.didattica.polito.it/api/courses/{courseId}/videolectures, when no video lectures are present, returns

HTTP: 404 Body:

{
   "code": -404,
   "message": "videolecture_not_found"
}

Instead of the expected result: HTTP: 200 Body:

{ "data": [] }

Note: This behavior affects the polito/students-app, which throws an exception for courses without video lectures.

Proposed solutions: Correct the API, or amend the documentation to include this response.

lpezzolla commented 1 year ago

Hello Massimo, we are aware of the issue, it will be fixed in the upcoming days.