mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
feat(Dispatcher): Add debug log for controller methods returning raw data not wrapped in Response
Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
parent
d61d62b64f
commit
dd0ed02b91
1 changed files with 4 additions and 0 deletions
|
|
@ -208,6 +208,10 @@ class Dispatcher {
|
|||
$response = \call_user_func_array([$controller, $methodName], $arguments);
|
||||
$this->eventLogger->end('controller:' . get_class($controller) . '::' . $methodName);
|
||||
|
||||
if (!($response instanceof Response)) {
|
||||
$this->logger->debug($controller::class . '::' . $methodName . ' returned raw data. Please wrap it in a Response or one of it\'s inheritors.');
|
||||
}
|
||||
|
||||
// format response
|
||||
if ($response instanceof DataResponse || !($response instanceof Response)) {
|
||||
// get format from the url format or request format parameter
|
||||
|
|
|
|||
Loading…
Reference in a new issue