diff --git a/gravitee-exchange-connector/gravitee-exchange-connector-websocket/src/main/java/io/gravitee/exchange/connector/websocket/channel/WebSocketConnectorChannel.java b/gravitee-exchange-connector/gravitee-exchange-connector-websocket/src/main/java/io/gravitee/exchange/connector/websocket/channel/WebSocketConnectorChannel.java index cd9e110..4340e4c 100644 --- a/gravitee-exchange-connector/gravitee-exchange-connector-websocket/src/main/java/io/gravitee/exchange/connector/websocket/channel/WebSocketConnectorChannel.java +++ b/gravitee-exchange-connector/gravitee-exchange-connector-websocket/src/main/java/io/gravitee/exchange/connector/websocket/channel/WebSocketConnectorChannel.java @@ -16,7 +16,6 @@ package io.gravitee.exchange.connector.websocket.channel; import io.gravitee.exchange.api.channel.exception.ChannelException; -import io.gravitee.exchange.api.channel.exception.ChannelInitializationException; import io.gravitee.exchange.api.command.Command; import io.gravitee.exchange.api.command.CommandAdapter; import io.gravitee.exchange.api.command.CommandHandler; @@ -75,7 +74,7 @@ public Completable initialize() { this.targetId = reply.getPayload().getTargetId(); this.active = true; } else { - throw new ChannelInitializationException("Unable to parse hello reply payload"); + throw new WebSocketConnectorException(String.format("Hello handshake failed: %s", reply.getErrorDetails()), false); } }); })