Merge pull request #10252 from demarches-simplifiees/more_log_to_adresse_controller

Tech: ajoute des metadata pour débugger un pb sur l'adresse controller
This commit is contained in:
Colin Darie 2024-04-02 14:16:37 +00:00 committed by GitHub
commit fe12df1892
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,13 +6,16 @@ class DataSources::AdresseController < ApplicationController
if response.success?
results = JSON.parse(response.body, symbolize_names: true)
render json: format_results(results)
else
render json: []
return render json: format_results(results)
end
else
render json: []
end
render json: []
rescue JSON::ParserError => e
Sentry.set_extras(body: response.body, code: response.code)
Sentry.capture_exception(e)
render json: []
end
private