Skip to content

Commit d3abb5d

Browse files
committed
flash bridge errors to admins
1 parent a51ba57 commit d3abb5d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

app/Http/Controllers/SettingsController.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,20 @@ public function __construct()
2323

2424
/**
2525
* Display a listing of the resource.
26-
*
2726
* @param VoiceSettings $voiceSettings
2827
* @return Response|ResponseFactory
29-
* @throws Exception
3028
*/
3129
public function edit(VoiceSettings $voiceSettings)
3230
{
33-
$bridgeClient = new BridgeClientService();
31+
$version = 'unknown';
32+
try {
33+
$bridgeClient = new BridgeClientService();
34+
35+
$version = $bridgeClient->getControlPanelVersion();
36+
} catch (Exception $e) {
37+
flash('BRIDGE ERROR: ', $e->getMessage(), 'error');
38+
}
3439

35-
$version = $bridgeClient->getControlPanelVersion();
3640

3741
return inertia('Settings/Edit', [
3842
'currentVersion' => $version,

0 commit comments

Comments
 (0)