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?
|
if response.success?
|
||||||
results = JSON.parse(response.body, symbolize_names: true)
|
results = JSON.parse(response.body, symbolize_names: true)
|
||||||
|
|
||||||
render json: format_results(results)
|
return render json: format_results(results)
|
||||||
else
|
|
||||||
render json: []
|
|
||||||
end
|
end
|
||||||
else
|
|
||||||
render json: []
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
render json: []
|
||||||
|
|
||||||
|
rescue JSON::ParserError => e
|
||||||
|
Sentry.set_extras(body: response.body, code: response.code)
|
||||||
|
Sentry.capture_exception(e)
|
||||||
|
render json: []
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in a new issue