This commit is contained in:
Saeed Vaziry
2024-03-24 09:56:34 +01:00
committed by GitHub
parent 884f18db63
commit 4d051330d6
1055 changed files with 14493 additions and 20278 deletions

View File

@ -27,11 +27,18 @@ public function create(User $user, array $input): void
$storageProvider->credentials = $storageProvider->provider()->credentialData($input);
if (! $storageProvider->provider()->connect()) {
try {
if (! $storageProvider->provider()->connect()) {
throw ValidationException::withMessages([
'provider' => __("Couldn't connect to the provider"),
]);
}
} catch (\Throwable $e) {
throw ValidationException::withMessages([
'provider' => __("Couldn't connect to the provider"),
'provider' => $e->getMessage(),
]);
}
$storageProvider->save();
}