Active degraded mode if insee is disabled

This commit is contained in:
Xavier J 2016-10-30 22:59:57 +01:00
parent b1788ef481
commit 6044c120c5
8 changed files with 64 additions and 8 deletions

View file

@ -86,7 +86,8 @@ class Users::DossiersController < UsersController
end
rescue RestClient::ResourceNotFound, RestClient::BadRequest
errors_valid_siret
rescue RestClient::ServiceUnavailable
render '/dossiers/degraded', formats: 'js'
rescue ActiveRecord::RecordNotFound
flash.alert = t('errors.messages.dossier_not_found')
redirect_to url_for users_dossiers_path