summaryrefslogtreecommitdiffstats
path: root/controller/jsonhttperror.php
diff options
context:
space:
mode:
Diffstat (limited to 'controller/jsonhttperror.php')
-rw-r--r--controller/jsonhttperror.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/controller/jsonhttperror.php b/controller/jsonhttperror.php
index b841ba5b5..962520b6a 100644
--- a/controller/jsonhttperror.php
+++ b/controller/jsonhttperror.php
@@ -23,11 +23,8 @@ trait JSONHttpError {
* @param int the http error code
* @return \OCP\AppFramework\Http\JSONResponse
*/
- public function error($exception, $code) {
- return new JSONResponse(
- array('message' => $exception->getMessage()),
- $code
- );
+ public function error(\Exception $exception, $code) {
+ return new JSONResponse(['message' => $exception->getMessage()], $code);
}