You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the dialogue client and it threw this exception when attempting to hit a conjure endpoint of an undertow server whose return type was an alias for 'binary':
ERROR [2020-09-29T06:35:04.005393Z] <redacted> {}. (<redacted>, throwable0_received: application/json, throwable0_supportedEncodings: [EncodingDeserializerContainer{encoding=BinaryEncoding{application/octet-stream}, deserializer=InputStreamDeserializer{}}])
com.palantir.logsafe.exceptions.SafeRuntimeException: Unsupported Content-Type
at com.palantir.conjure.java.dialogue.serde.ConjureBodySerDe$EncodingDeserializerRegistry$1.deserialize(ConjureBodySerDe.java:298)
at com.palantir.conjure.java.dialogue.serde.ConjureBodySerDe$EncodingDeserializerRegistry.deserialize(ConjureBodySerDe.java:257)
at com.palantir.dialogue.futures.DialogueDirectTransformationFuture.onSuccess(DialogueDirectTransformationFuture.java:103)
at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1021)
at com.palantir.dialogue.futures.SafeDirectExecutor.execute(SafeDirectExecutor.java:32)
at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1137)
at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:957)
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:726)
at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:957)
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:726)
at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:47)
...
Suppressed: com.palantir.logsafe.exceptions.SafeRuntimeException: Rethrown by dialogue
at com.palantir.conjure.java.dialogue.serde.DefaultClients.block(DefaultClients.java:124)
...
I was able to fix this by directly returning the binary type in my endpoint:
<redacted>:
http: PUT /<redacted>
args:
request:
param-type: body
type: <redacted>
returns: binary
to be clear, it looked like this before
<redacted>:
http: PUT /<redacted>
args:
request:
param-type: body
type: <redacted>
returns: Foo
Foo:
alias: binary
What did you want to happen?
Seems like binary aliases should work as return types. Not sure if this is a bug in the dialogue client or in the undertow endpoint generated.
The text was updated successfully, but these errors were encountered:
+1 I noticed this recently when trying to update conjure-go to correctly reflect the conjure-verification BinaryAliasExample test cases. The verifier is expecting these to be JSON serialized (quoted, base64, json content-type) where I expected to match the behavior for plain binary types.
What happened?
I'm using the dialogue client and it threw this exception when attempting to hit a conjure endpoint of an undertow server whose return type was an alias for 'binary':
I was able to fix this by directly returning the binary type in my endpoint:
to be clear, it looked like this before
What did you want to happen?
Seems like binary aliases should work as return types. Not sure if this is a bug in the dialogue client or in the undertow endpoint generated.
The text was updated successfully, but these errors were encountered: