We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 812cbea commit 8db1639Copy full SHA for 8db1639
spec/openai/client/http_spec.rb
@@ -155,7 +155,13 @@
155
156
context "when OpenAI returns an HTTP error" do
157
let(:chunk) { "{\"error\":{\"message\":\"A bad thing has happened!\"}}" }
158
- let(:env) { Faraday::Env.new(status: 500) }
+ let(:env) do
159
+ Faraday::Env.new(
160
+ status: 500,
161
+ url: URI::HTTPS.build(host: "api.openai.com"),
162
+ request: Faraday::RequestOptions.new
163
+ )
164
+ end
165
166
it "does not raise an error and calls the user proc with the error parsed as JSON" do
167
expect(user_proc).to receive(:call).with(
0 commit comments