-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[5.4] Adjust status code of com_joomlaupdate APIs if automated updates are disabled #45966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.4] Adjust status code of com_joomlaupdate APIs if automated updates are disabled #45966
Conversation
409 would fit better I think |
... 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. |
Hmm, 409 indeed seems more suitable than 404. |
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. |
I'm ok with that. As the Rolling Stones sang: You can't always get what you want :-) |
I have tested this item ✅ successfully on 0cd8e66 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45966. |
I have tested this item ✅ successfully on 0cd8e66 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45966. |
I have tested this item ✅ successfully on 0cd8e66 |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45966. |
✅ Final test before merge, using public instance with manual installation
|
Thank you @SniperSister for your contribution. Thank you @HLeithner and @richard67 for supporting this issue. Thank you @rbuelund and @exlemor for testing. |
Pull Request for Issue #45962
Summary of Changes
Throw a 404 instead of a 500
Testing Instructions
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