Requests to /api/v1 may return html #2110

Closed
opened 2024-02-13 06:49:21 +00:00 by ce72 · 1 comment
Contributor

Description

Up to release 0.23.0 calling GET /api/v1/tasks/999999 resulted in a 404 response with a body like {"code":4002,"message":"This task does not exist"}

When performing the same call to the recent 0.23.0 version it returns 200 OK with an HTML content. This happens even when setting the HTTP Header Accept=application/json.
This breaks expectations of CLI tools like vja or curl based scripts. There seems to be a global 404 handling which might be too global?

Vikunja Version

0.23.0

Browser and version

cli

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

No response

### Description Up to release 0.23.0 calling `GET /api/v1/tasks/999999` resulted in a 404 response with a body like `{"code":4002,"message":"This task does not exist"}` When performing the same call to the recent 0.23.0 version it returns 200 OK with an HTML content. This happens even when setting the HTTP Header `Accept=application/json`. This breaks expectations of CLI tools like vja or curl based scripts. There seems to be a global 404 handling which might be too global? ### Vikunja Version 0.23.0 ### Browser and version cli ### Can you reproduce the bug on the Vikunja demo site? Yes ### Screenshots _No response_
ce72 added the
kind/bug
label 2024-02-13 06:49:21 +00:00
Owner

Should be fixed in 641fec1215 - please check with the next unstable build (ready in ~45min) or on try.

Should be fixed in https://kolaente.dev/vikunja/vikunja/commit/641fec12157504b8ed2935ba9943828662a725f9 - please check with the next unstable build (ready in ~45min) or on try.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#2110
No description provided.