controllers: fix crash on APIEntreprise::API::Error::TimedOut
In that case we want to display the nicely formatted error message to the user, instead of a "Error 500" page.
This commit is contained in:
parent
56c2e57aee
commit
a2028e115b
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ class Champs::SiretController < ApplicationController
|
|||
|
||||
begin
|
||||
etablissement = find_etablissement_with_siret
|
||||
rescue APIEntreprise::API::Error::RequestFailed, APIEntreprise::API::Error::ServiceUnavailable
|
||||
rescue APIEntreprise::API::Error::RequestFailed, APIEntreprise::API::Error::BadGateway, APIEntreprise::API::Error::TimedOut, APIEntreprise::API::Error::ServiceUnavailable
|
||||
# i18n-tasks-use t('errors.messages.siret_network_error')
|
||||
return siret_error(:network_error)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue