discourse-ai/spec/requests
Rafael dos Santos Silva cfc6e388df
FIX: Ensure embeddings database outages are handled gracefully (#80)
The rails_failover middleware will intercept all `PG::ConnectionBad` errors and put the cluster into readonly mode. It does not have any handling for multiple databases. Therefore, an issue with the embeddings database was taking the whole cluster into readonly.

This commit fixes the issue by rescuing `PG::Error` from all AI database accesses, and re-raises errors with a different class. It also adds a spec to ensure that an embeddings database outage does not affect the functionality of the topics/show route.

Co-authored-by: David Taylor <david@taylorhq.com>
2023-05-23 22:57:52 +01:00
..
ai_bot FEATURE: Less friction for starting a conversation with an AI bot. (#63) 2023-05-16 14:38:21 -03:00
ai_helper FEATURE: Anthropic Claude for AIHelper and Summarization modules (#39) 2023-04-10 11:04:42 -03:00
summarization FEATURE: Topic summarization (#41) 2023-04-19 17:57:31 -03:00
topic_spec.rb FIX: Ensure embeddings database outages are handled gracefully (#80) 2023-05-23 22:57:52 +01:00