Skip to content

Conversation

@alikon
Copy link
Contributor

@alikon alikon commented Sep 25, 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

@alikon alikon changed the title Verb delete return 404 for not existent [6.0] Fix DELETE endpoints to return 404 for non-existent resources Sep 25, 2025
@alikon alikon marked this pull request as ready for review September 25, 2025 10:17
@muhme
Copy link
Contributor

muhme commented Oct 3, 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.

@basd82
Copy link

basd82 commented Oct 5, 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.

@richard67
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Oct 5, 2025
@Bodge-IT Bodge-IT added this to the Joomla! 6.0.1 milestone Nov 10, 2025
@Bodge-IT Bodge-IT merged commit 17bd8a4 into joomla:6.0-dev Nov 10, 2025
42 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Nov 10, 2025
@Bodge-IT
Copy link
Contributor

Thanks @alikon and @basd82 & @muhme for testing

@alikon alikon deleted the webservices-delete-404 branch November 12, 2025 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants