diff --git a/app/Livewire/SettingsOauth.php b/app/Livewire/SettingsOauth.php index f17730a10..77d3b36fc 100644 --- a/app/Livewire/SettingsOauth.php +++ b/app/Livewire/SettingsOauth.php @@ -50,6 +50,10 @@ private function updateOauthSettings(?string $provider = null) $oauthData = $this->oauth_settings_map[$provider]; $oauth = OauthSetting::find($oauthData['id']); + if (!$oauth) { + throw new \Exception('OAuth setting for '.$provider.' not found. It may have been deleted.'); + } + $oauth->fill([ 'enabled' => $oauthData['enabled'], 'client_id' => $oauthData['client_id'],