feat: log timeout search terms
This commit is contained in:
parent
7f0618e6ef
commit
2b749b2c5b
1 changed files with 17 additions and 0 deletions
|
@ -71,6 +71,23 @@ class RechercheController < ApplicationController
|
|||
else
|
||||
return
|
||||
end
|
||||
|
||||
rescue ActiveRecord::QueryCanceled => e
|
||||
Sentry.capture_exception(e)
|
||||
|
||||
logger = Lograge.logger || Rails.logger
|
||||
|
||||
payload = {
|
||||
message: 'search timeout',
|
||||
user_id: current_user.id,
|
||||
request_id: Current.request_id,
|
||||
controller: self.class.name,
|
||||
terms: @search_terms
|
||||
}
|
||||
|
||||
logger.info(payload.to_json)
|
||||
|
||||
redirect_to recherche_index_path, alert: "La recherche n'a pas pu aboutir."
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in a new issue