Skip to content

Commit

Permalink
Don't just log but also capture Keycloak exceptions during client cre…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
Anahkiasen committed Jan 20, 2025
1 parent eb3c1bc commit 4cf767a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Keycloak/Listeners/CreateClients.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Illuminate\Contracts\Queue\ShouldQueue;
use Psr\Log\LoggerInterface;
use Throwable;
use function Sentry\captureException;

final class CreateClients implements ShouldQueue
{
Expand Down Expand Up @@ -88,6 +89,7 @@ private function createClientsInKeycloak(Integration $integration, Realms $realm

$clientCollection->add($client);
} catch (KeyCloakApiFailed $e) {
captureException($e);
$this->logger->error($e->getMessage());
}
}
Expand Down

0 comments on commit 4cf767a

Please sign in to comment.