Issue Forked from #34233 (comment)
It is possible to generate an uncaught exception in Mail Templates when path::check
detects snooping
This issue is two parted
Path::check
- I dont have steps to replicate this but I think my logic is right.Exception is handled and returned
An error has occurred while fetching the JSON data: HTTP 502 status code. Bad Gateway" error message shown on the page
PHP Fatal error.
Labels |
Added:
?
|
yup - well thats bad too haha... The exception is being thrown as I debugged that far, but you are right I did not debug all the way to the response.
This should be fixed though, its a valid bug
Need a way to replicate it ;)
We have global exception handler, that in theory should catch everything. Maybe server just decided to die
Ive not had much time this week sorry, i should have more time over the weekend and next week to catch up with this.
Take your time, nothing really critical here ;)
What's the endpoint for the Ajax request?
Obviously there should be a try/catch when trying to parse a JSON response and pretty sure that there are many instances that missing it
Obviously there should be a try/catch
There is try/catch, and then "catch" shows error which @PhilETaylor posted.
It not JS, it server side error.
The root issue is that throwing an exception, with code 20
from php-fpm back to the web server is invalid... and so nginx shows a Bad Gateway (gateway = php-fpm)
webserver_1 | 2021/06/01 15:10:43 [error] 31#31: *109 upstream sent invalid status "20" while reading response header from upstream, client: 172.19.0.1, server: , request: "GET /administrator/index.php?option=com_config&task=application.sendtestmail&format=json&af9486544568df6501f01ab2402786ea=1 HTTP/1.1", upstream: "fastcgi://172.19.0.6:9000", host: "127.0.0.1:4444"
PR'ing now.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-08-21 13:22:30 |
Closed_By | ⇒ | PhilETaylor | |
Labels |
Added:
No Code Attached Yet
Removed: ? |
As far as I remember such JSON error happen for broken response, in your case
502 Bad gateway
, server just crashes.It not Exception.