Skip to content

Commit 33bda07

Browse files
committed
Better error handling
1 parent 720f04f commit 33bda07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/SseService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ public function throwException(Throwable $exception): void
292292
'exception' => $exception,
293293
]));
294294
} else {
295-
$event = new ExecuteScript('console.error(' . json_encode($exception->getMessage()) . ');');
295+
$message = Craft::t('app', 'A server error occurred.');
296+
$event = new ExecuteScript('console.error(' . json_encode($message) . ');');
296297
}
297298
echo $event->getOutput();
298299
})->send();

0 commit comments

Comments
 (0)