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

@@ -97,9 +97,8 @@ RSpec.describe 'Integration Hooks API', type: :request do
params: params,
headers: agent.create_new_auth_token,
as: :json
expect(response).to have_http_status(:success)
expect(response.parsed_body['message']).to eq('No processor found')
expect(response).to have_http_status(:unprocessable_entity)
expect(response.parsed_body['error']).to eq 'No processor found'
end
end
end