fix: Handle OpenAI API errors (#9560)

This commit is contained in:
Muhsin Keloth
2024-08-22 10:24:13 +05:30
committed by GitHub
parent 6571baf211
commit 429d281501
8 changed files with 30 additions and 18 deletions

View File

@@ -37,7 +37,7 @@ RSpec.describe Integrations::Hook do
it 'returns no processor found for hooks with out processor defined' do
hook = create(:integrations_hook, account: account)
expect(hook.process_event(params)).to eq('No processor found')
expect(hook.process_event(params)).to eq({ :error => 'No processor found' })
end
it 'returns results from procesor for openai hook' do