Skip to content

Commit

Permalink
log any errors from search function
Browse files Browse the repository at this point in the history
  • Loading branch information
merefield committed Apr 13, 2024
1 parent d9c4738 commit 6592772
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/discourse_chatbot/functions/forum_search_function.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ def process(args)
end
end
response
rescue
rescue StandardError => e
Rails.logger.error("Chatbot: Error occurred while attempting to retrieve Forum Search results for query '#{query}': #{e.message}")
I18n.t("chatbot.prompt.function.forum_search.error", query: args[parameters[0][:name]])
end
end
Expand Down

0 comments on commit 6592772

Please sign in to comment.