Closed borkdude closed 3 years ago
In clojure I'm getting:
{:Error {:Code "IllegalLocationConstraintException", :CodeAttrs {}, :Message "The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.", :MessageAttrs {}, :RequestId "A4F459512AE95690", :RequestIdAttrs {}, :HostId "M1pgyjwFZQwJWxZqGWJR7BYI3LSr+yR9yAULcYO/cUoh9DAlkWb00T3l4x4c5BPRRnzL6QmUMGg=", :HostIdAttrs {}}, :ErrorAttrs {}, :cognitect.anomalies/category :cognitect.anomalies/incorrect}
[{:Name "rotocode.dre", :CreationDate #inst "2020-07-07T07:32:16.000-00:00"}]
It seems error handling is not perfect yet. After further investigation, it turns out to be a difference between JVM and native.
better:
Exception in thread "main" java.lang.RuntimeException: java.lang.Exception: Not supported: class java.lang.IllegalArgumentException
at com.cognitect.transit.impl.WriterFactory$1.write(WriterFactory.java:65)
at cognitect.transit$write.invokeStatic(transit.clj:171)
at cognitect.transit$write.invoke(transit.clj:168)
at pod.babashka.aws$write_transit.invokeStatic(aws.clj:74)
at pod.babashka.aws$write_transit.invoke(aws.clj:72)
at pod.babashka.aws$_main$fn__11212$fn__11213.invoke(aws.clj:102)
at pod.babashka.aws$_main$fn__11212.invoke(aws.clj:101)
at pod.babashka.aws$_main.invokeStatic(aws.clj:92)
at pod.babashka.aws$_main.doInvoke(aws.clj:77)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at pod.babashka.aws.main(Unknown Source)
Caused by: java.lang.Exception: Not supported: class java.lang.IllegalArgumentException
at com.cognitect.transit.impl.AbstractEmitter.marshal(AbstractEmitter.java:194)
at com.cognitect.transit.impl.JsonEmitter.emitMap(JsonEmitter.java:171)
at com.cognitect.transit.impl.AbstractEmitter.emitMap(AbstractEmitter.java:85)
at com.cognitect.transit.impl.AbstractEmitter.marshal(AbstractEmitter.java:184)
at com.cognitect.transit.impl.AbstractEmitter.marshalTop(AbstractEmitter.java:211)
at com.cognitect.transit.impl.JsonEmitter.emit(JsonEmitter.java:41)
at com.cognitect.transit.impl.WriterFactory$1.write(WriterFactory.java:62)
... 12 more```
so this `:cognitect.aws.client/throwable` key is something we should datafy or something first
because transit doesn't know
We're running into reflection warnings it seems with GraalVM native-image. Fixed in https://github.com/cognitect-labs/aws-api/commit/b65d61d6e69880786061d8c7ad5893cce8bc14a8. Luckily we're using deps.edn so we can just use it from master.
I'm getting:
Any ideas @lispyclouds @jeroenvandijk ?