d2iq-archive / mesos-rxjava

RxJava client for Apache Mesos HTTP APIs
Apache License 2.0
42 stars 27 forks source link

MesosClient doesn't report error description #66

Closed egor-ryashin closed 7 years ago

egor-ryashin commented 7 years ago

MesosClient ignores http response content on error and doesn't report error description:

Exception in thread "main" com.mesosphere.mesos.rx.java.Mesos4xxException: Error while trying to send request. Status: 400 Message: '' at com.mesosphere.mesos.rx.java.MesosClient.lambda$verifyResponseOk$1(MesosClient.java:260) at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:69) at rx.internal.operators.OperatorSubscribeOn$1$1.onNext(OperatorSubscribeOn.java:53) at rx.observers.Subscribers$5.onNext(Subscribers.java:235)

You can find the responsible source code here: mesos-rxjava-client-0.1.0-sources.jar!/com/mesosphere/mesos/rx/java/MesosClient.java:242

Example of the content skipped:

Failed to validate scheduler::Call: 'framework_id' differs from 'subscribe.framework_info.id'

BenWhitehead commented 7 years ago

@egor-ryashin I've fixed this issues in #67 however snapshot publishing is currently broken due to an error from gpg that I'm still tracking down. Hopefully I'll have some time to get it fixed in the next little bit.

BenWhitehead commented 7 years ago

@egor-ryashin I finally managed to get a build host with working gpg and was able to publish a 0.1.1-SNAPSHOT to sonatype. Can you try updating to that and see if it allows you to see the message in the exception message? Here are instructions for adding the snapshot repo: https://github.com/mesosphere/mesos-rxjava#snapshot-release

egor-ryashin commented 7 years ago

Works perfectly, thanks!