RTC PBF PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar SniperSister
SniperSister
22 Aug 2025

Pull Request for Issue #45962

Summary of Changes

Throw a 404 instead of a 500

Testing Instructions

  • Install 5.4.0-beta1 on public available site
  • Make sure that autoupdates are disabled
  • Using a http client of choice, perform a request against /api/index.php/v1/joomlaupdate/healthcheck

Actual result BEFORE applying this Pull Request

500 thrown

Expected result AFTER applying this Pull Request

404 thrown

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 SniperSister SniperSister - open - 22 Aug 2025
avatar SniperSister SniperSister - change - 22 Aug 2025
Status New Pending
avatar HLeithner
HLeithner - comment - 22 Aug 2025

409 would fit better I think

avatar SniperSister
SniperSister - comment - 22 Aug 2025

... and I think that the general error handling of the JsonapiRenderer needs a serious refactoring as it's currently impossible to define an status code from an application level, you have to rely on the pre-defined handlers and their hardcoded codes.

avatar richard67
richard67 - comment - 22 Aug 2025

Hmm, 409 indeed seems more suitable than 404.

avatar SniperSister
SniperSister - comment - 22 Aug 2025

As I said: the API does not allow custom status codes. Specific exceptions are associated with specific codes. We would have to add a new exception type for a 409, which just builds yet another layer on this insufficient base design. I’m not doing this in my PR. Either use it or propose an alternate approach.

avatar richard67
richard67 - comment - 22 Aug 2025

I'm ok with that. As the Rolling Stones sang: You can't always get what you want :-)

avatar richard67 richard67 - change - 22 Aug 2025
Labels Added: PBF PR-5.4-dev
avatar cybersalt cybersalt - test_item - 23 Aug 2025 - Tested successfully
avatar cybersalt
cybersalt - comment - 23 Aug 2025

I have tested this item ✅ successfully on 0cd8e66

Received a 404 after the patch.


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

avatar exlemor exlemor - test_item - 23 Aug 2025 - Tested successfully
avatar exlemor
exlemor - comment - 23 Aug 2025

I have tested this item ✅ successfully on 0cd8e66

I have tested this successfully with Tim ;) Thanks @SniperSister!


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

avatar rbuelund
rbuelund - comment - 23 Aug 2025

I have tested this item ✅ successfully on 0cd8e66

avatar richard67 richard67 - change - 23 Aug 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 23 Aug 2025

RTC


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

avatar muhme muhme - change - 23 Aug 2025
Labels Added: RTC
avatar muhme
muhme - comment - 23 Aug 2025

✅ Final test before merge, using public instance with manual installation

  • before the PR
curl -H 'X-JUpdate-Token: 4711' 'https://joomla-test.heikol.de/api/index.php/v1/joomlaupdate/healthcheck'
{"errors":[{"code":500,"title":"Internal server error"}]}%  
  • After second installation with this PR from full package:
    {"errors":[{"title":"Resource not found","code":404}]}%
avatar muhme muhme - change - 23 Aug 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-08-23 12:46:37
Closed_By muhme
avatar muhme muhme - close - 23 Aug 2025
avatar muhme muhme - merge - 23 Aug 2025
avatar muhme
muhme - comment - 23 Aug 2025

Thank you @SniperSister for your contribution. Thank you @HLeithner and @richard67 for supporting this issue. Thank you @rbuelund and @exlemor for testing.

Add a Comment

Login with GitHub to post a comment