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 b5fbe9e commit 662e10fCopy full SHA for 662e10f
src/clojars/aws_util.clj
@@ -2,9 +2,14 @@
2
(:require
3
[cognitect.aws.client.api :as aws]))
4
5
+(defn- not-found-error?
6
+ [v]
7
+ (= :cognitect.anomalies/not-found (:cognitect.anomalies/category v)))
8
+
9
(defn- throw-on-error
10
[v]
- (if (some? (:cognitect.anomalies/category v))
11
+ (if (and (some? (:cognitect.anomalies/category v))
12
+ (not (not-found-error? v)))
13
(throw (ex-info "AWS request failed" v))
14
v))
15
@@ -14,5 +19,5 @@
19
20
(defn not-found->nil
16
21
17
- (when (not= :cognitect.anomalies/not-found (:cognitect.anomalies/category v))
22
+ (when (not (not-found-error? v))
18
23
0 commit comments