Skip to content

Fix delete endpoint returning HTML 404 instead of JSON error#1287

Merged
streamtw merged 1 commit intoUniSharp:masterfrom
benjdiasaad:fix-issue-1276-delete-json-response
Mar 19, 2026
Merged

Fix delete endpoint returning HTML 404 instead of JSON error#1287
streamtw merged 1 commit intoUniSharp:masterfrom
benjdiasaad:fix-issue-1276-delete-json-response

Conversation

@benjdiasaad
Copy link
Copy Markdown
Contributor

Fixes #1276.

Previously the delete endpoint called abort(404) when the file did not exist on disk.
This returned an HTML response while the frontend expects JSON, which could cause a JSON.parse error.

This change replaces that behavior with the controller's existing JSON error flow, so the endpoint returns a proper JSON error response instead.

@streamtw streamtw merged commit 5abe451 into UniSharp:master Mar 19, 2026
1 of 2 checks passed
@streamtw
Copy link
Copy Markdown
Member

Thanks @benjdiasaad !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delete request fails after first use — 404 Not Found + JSON.parse error

2 participants