Unit/System Tests Webservices PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
25 Sep 2025

Pull Request for Issue #46095 .

Summary of Changes

This PR fixes the DELETE endpoints to properly return HTTP 404 status code when attempting to delete non-existent resources, instead of returning 204 (No Content).

Testing Instructions

execute a DELETE for a non-existent resource es: /api/index.php/v1/contacts/99999

Actual result BEFORE applying this Pull Request

DELETE /api/v1/contacts/9999 returned 204 (No Content)

Expected result AFTER applying this Pull Request

DELETE /api/v1/contacts/9999 returns 404 (Not Found) with error message

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar alikon alikon - open - 25 Sep 2025
avatar alikon alikon - change - 25 Sep 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Sep 2025
Category Libraries JavaScript Unit Tests
724d820 25 Sep 2025 avatar alikon cs
avatar alikon alikon - change - 25 Sep 2025
Labels Added: Unit/System Tests PR-6.0-dev
avatar alikon alikon - change - 25 Sep 2025
The description was changed
avatar alikon alikon - edited - 25 Sep 2025
avatar alikon alikon - change - 25 Sep 2025
Labels Added: Webservices
avatar alikon alikon - change - 25 Sep 2025
Title
Verb delete return 404 for not existent
[6.0] Fix DELETE endpoints to return 404 for non-existent resources
avatar alikon alikon - edited - 25 Sep 2025
avatar alikon alikon - change - 25 Sep 2025
The description was changed
avatar alikon alikon - edited - 25 Sep 2025
avatar muhme muhme - test_item - 3 Oct 2025 - Tested successfully
avatar muhme
muhme - comment - 3 Oct 2025

I have tested this item ✅ successfully on f9f4ac1

Tested with JBT and test_46161.sh:

  • Before the PR with 6.0-dev
    • ✅ Deleting not-trashed article > 409 (CONFLICT)
      • data.message: Resource not in state that can be deleted, must be trashed before it can be deleted
      • messages.warning: Delete not permitted.
    • ✅ Deleting trashed article/content category/tag > 204 (NO CONTENT)
    • ❌ Deleting non-existing article/content category/tag > 204 (NO CONTENT)
  • After applying PR with graft full package
    • ✅ Deleting not-trashed article > 409 (CONFLICT)
      • data.message: Resource not in state that can be deleted, must be trashed before it can be deleted
      • messages.warning: Delete not permitted.
    • ✅ Deleting trashed article/content category/tag > 204 (NO CONTENT)
    • ✅ Deleting non-existing article/content category/tag > 404 (NOT FOUND)
      • data.message: Resource not found
      • data.status: not found

Thank you 👍


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46161.

avatar basd82 basd82 - test_item - 5 Oct 2025 - Tested successfully
avatar basd82
basd82 - comment - 5 Oct 2025

I have tested this item ✅ successfully on f9f4ac1

Before patch i got 204
Now a 404 as exspected

thanks @alikon


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46161.

avatar richard67 richard67 - change - 5 Oct 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 5 Oct 2025

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46161.

Add a Comment

Login with GitHub to post a comment