diff options
-rw-r--r-- | controller/filehandlingcontroller.php | 3 | ||||
-rw-r--r-- | tests/controller/filehandlingcontrollertest.php | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/controller/filehandlingcontroller.php b/controller/filehandlingcontroller.php index 4d34759..e1ac927 100644 --- a/controller/filehandlingcontroller.php +++ b/controller/filehandlingcontroller.php @@ -103,8 +103,7 @@ class FileHandlingController extends Controller{ } } catch (\Exception $e) { - $hint = method_exists($e, 'getHint') ? $e->getHint() : $e->getMessage(); - return new DataResponse(['message' => (string)$hint], Http::STATUS_BAD_REQUEST); + return new DataResponse(['message' => 'An internal server error occurred.'], Http::STATUS_BAD_REQUEST); } } diff --git a/tests/controller/filehandlingcontrollertest.php b/tests/controller/filehandlingcontrollertest.php index 729a52d..8f9617b 100644 --- a/tests/controller/filehandlingcontrollertest.php +++ b/tests/controller/filehandlingcontrollertest.php @@ -131,7 +131,7 @@ class FileHandlingControllerTest extends TestCase { $this->assertSame(400, $result->getStatus()); $this->assertArrayHasKey('message', $data); - $this->assertSame($exceptionHint, $data['message']); + $this->assertSame('An internal server error occurred.', $data['message']); } /** |