Skip to content

Commit

Permalink
fix: pass HTTP errors through instead of crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
grossvogel committed Jun 5, 2023
1 parent bcbb021 commit 0ff5e01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/pinecone/http.ex
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ defmodule Pinecone.Http do
{:error, body}
end

defp parse_response({:error, _reason} = error), do: error

defp url(type, endpoint, env) when type in [:indices, :collections] do
env =
if env do
Expand Down

0 comments on commit 0ff5e01

Please sign in to comment.