We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ff2f12 commit de6d75cCopy full SHA for de6d75c
src/services/SseService.php
@@ -284,10 +284,14 @@ public function shouldCloseSession(bool $value): static
284
*/
285
public function throwException(Throwable $exception): void
286
{
287
- if (!$this->isStreamedResponse) {
+ if (Craft::$app->getConfig()->getGeneral()->devMode) {
288
+ Craft::$app->getRequest()->getHeaders()->set('Accept', 'text/html');
289
+ Craft::$app->getResponse()->format = Response::FORMAT_HTML;
290
+
291
throw $exception;
292
}
293
294
+ $this->setSseMethodInProcess(null);
295
$this->executeScript('console.error(' . json_encode($exception->getMessage()) . ');');
296
flush();
297
exit();
0 commit comments