-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.3.3, 4.4
-
MOODLE_403_STABLE, MOODLE_404_STABLE
If there is an exception thrown in a webservice apart from the core rest webservice, Whoops overrides the exception name, for example:
{
|
"exception": "Whoops\\Exception\\ErrorException", |
"message": "Attempt to read property \"quizid\" on array" |
}
|
I noticed this when using webservice_restful ( https://github.com/catalyst/moodle-webservice_restful )
I'm not 100% sure why this does not affect the core Rest webservice (I have not tested soap), but nevertheless I think Whoops should never activate when using webservices, as it was originally intended only for web requests.
Adding
|| WS_SERVER
|
here https://github.com/moodle/moodle/blob/f30110b5ebf9090ee484986e020d43a7819fc436/lib/setuplib.php#L354
appears to fix it
- is a regression caused by
-
MDL-79974 Improve DX for exceptions when developing and make it easier to open in editor
-
- Closed
-