| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8ad14b3 commit e44dcf9
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -313,7 +313,7 @@ private function handleRequest(TransportInterface $transport, Request $request, | |||
| 313 | 313 | } catch (\Throwable $e) { | |
| 314 | 314 | $this->logger->error(\sprintf('Uncaught exception: %s', $e->getMessage()), ['exception' => $e]); | |
| 315 | 315 | ||
| 316 | - $error = Error::forInternalError($e->getMessage(), $request->getId()); | ||
| 316 | + $error = Error::forInternalError(self::INTERNAL_ERROR_MESSAGE, $request->getId()); | ||
| 317 | 317 | $errorEvent = $this->dispatchEvent(new ErrorEvent($error, $request, $session, $e)); | |
| 318 | 318 | $error = $errorEvent->getError(); | |
| 319 | 319 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -670,7 +670,8 @@ public function testHandlerUnexpectedExceptionReturnsInternalError(): void | |||
| 670 | 670 | $message = json_decode($outgoing[0]['message'], true); | |
| 671 | 671 | $this->assertArrayHasKey('error', $message); | |
| 672 | 672 | $this->assertEquals(Error::INTERNAL_ERROR, $message['error']['code']); | |
| 673 | - $this->assertStringContainsString('Unexpected error', $message['error']['message']); | ||
| 673 | + $this->assertSame('Internal server error.', $message['error']['message']); | ||
| 674 | + $this->assertStringNotContainsString('Unexpected error', $message['error']['message']); | ||
| 674 | 675 | } | |
| 675 | 676 | ||
| 676 | 677 | #[TestDox('Notification handler exceptions are caught and logged')] | |
| Back | FazBrowse Home | New Git URL |
0 commit comments