cognitect-labs / aws-api

AWS, data driven
Apache License 2.0
724 stars 100 forks source link

301 gets :cognitect.anomlies/fault #237

Closed dchelimsky closed 1 year ago

dchelimsky commented 1 year ago

Dependencies

{:deps {com.cognitect.aws/api       {:mvn/version "0.8.664"}
        com.cognitect.aws/endpoints {:mvn/version "1.1.12.456"}
        com.cognitect.aws/s3        {:mvn/version "847.2.1365.0"}}}

Description with failing test case

Release 0.8.664 added status and headers when we get a 301 (along with other non-2xx's), so users can detect the 301 and do the right thing. One thing that would improve this slightly is returning an anomaly/category of incorrect instead of fault (which is a catch-all). This would be more precise.

dchelimsky commented 1 year ago

Changed to :cognitect.anomalies/incorrect in 0.8.666

dchelimsky commented 1 year ago

I thought I'd fixed this, but later learned that, due to the fat AWS does not provide a Location header with a 301, the jetty client is throwing an exception which pushes control through a different part of the code. Investigating.

dchelimsky commented 1 year ago

Fixed in 0.8.673 (it was fixed in 0.8.670, but that had a perf warning, so don't use that one)