carto: present API InternalServerError to the user, instead of failing
This commit is contained in:
parent
4de069d436
commit
803364490d
4 changed files with 60 additions and 32 deletions
|
@ -74,5 +74,9 @@ class Champs::CarteController < ApplicationController
|
|||
if @champ.persisted?
|
||||
@champ.save
|
||||
end
|
||||
|
||||
rescue RestClient::ResourceNotFound
|
||||
flash.alert = 'Les données cartographiques sont temporairement indisponibles. Réessayez dans un instant.'
|
||||
response.status = 503
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue