summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Bracco <href@random.sh>2022-12-11 01:57:54 +0000
committerJordan Bracco <href@random.sh>2022-12-11 02:03:36 +0000
commit96c905617da651746abd6c90a1727eeffd3dc485 (patch)
treefdf7f46bc3e6f25f851bb47c95c7598f27c25cf0
parentfeat(message): assign id (flake_id) (diff)
fix(couch): fix error handling in get/2,3
-rw-r--r--lib/couch.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/couch.ex b/lib/couch.ex
index 2d75314..50b031c 100644
--- a/lib/couch.ex
+++ b/lib/couch.ex
@@ -30,7 +30,7 @@ defmodule Couch do
case HTTPoison.get(url, headers, options) do
{:ok, %HTTPoison.Response{status_code: 200, body: body}} ->
{:ok, Poison.decode!(body)}
- error -> {:error, {:couchdb_error, error}}
+ error -> handle_generic_response(error)
end
end