ccrockett / omniauth-keycloak

Keycloak Strategy for OmniAuth.
MIT License
53 stars 42 forks source link

Handle exception occuring in set_up phase to prevent crash #46

Open hnguye34 opened 8 months ago

hnguye34 commented 8 months ago

Hi,

When an error occurs in setup_phase (Keycloak is down for exemple), the server is crashing because of the exception at thise line:(Faraday::ConnectionFailed)

response = Faraday.get config_url

This function set_up phase is called from omniauth gem, not from the server directly

How can we catch it from the server to prevent the crash and to handle the error , please ?

Thanks for any suggesion.