Fork me on GitHub
#aws
<
2021-11-26
>
ghadi18:11:03

seems like a bug -- can you file an issue @danie? I would love it if you can include the metadata attached to that map you received ^

kenny20:11:05

IIRC, I've discussed this with David. Often AWS returns non-compliant statuses, and indicates errors in other manners. I'll bet in this case, AWS returns a 400. I believe our previous conclusion was that this would be more configurable with the work in this execution-flow branch. As a workaround, we have our own wrapper invoke function that will “fix” anomaly categories by manually specifying how each service might return a busy status.

ghadi21:11:19

that may be the case, still want to examine the RAW

kenny00:11:34

We have a function like this to fix the categories. There's some other edge cases.

(defn canonical-anomaly-category
  [api aws-api-anomaly]
  (or
    (when (anom/retryable? aws-api-anomaly) (anom/category aws-api-anomaly))
    (when-let [retriable? (get api->retriable-fn api)]
      (when (retriable? aws-api-anomaly)
        ::anomalies/busy))
    (when-let [anom-type (:__type aws-api-anomaly)]
      (case anom-type
        "AccessDeniedException" ::anomalies/forbidden
        nil))
    (anom/http-status->category-lookup
      (get-in (meta aws-api-anomaly) [:http-response :status]))))

👍 1
ghadi18:11:20

feel free to sanitize private details