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:
commit
fe12df1892
1 changed files with 8 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue