diff --git a/exchanges/kraken/kraken_websocket.go b/exchanges/kraken/kraken_websocket.go index a48ebf8d105..309b7599d41 100644 --- a/exchanges/kraken/kraken_websocket.go +++ b/exchanges/kraken/kraken_websocket.go @@ -220,7 +220,7 @@ func (k *Kraken) wsHandleData(respRaw []byte) error { c := k.Websocket.GetSubscription(stream.DefaultChannelKey{Channel: channelName, Currency: wsPair, Asset: asset.Spot}) if c == nil { - return fmt.Errorf("could not find subscription channel: %s %s %s", asset.Spot, channelName, wsPair) + return fmt.Errorf("%w: %s %s %s", errSubscriptionNotFound, asset.Spot, channelName, wsPair) } if err := k.wsReadDataResponse(c, dataResponse); err != nil { diff --git a/exchanges/stream/websocket.go b/exchanges/stream/websocket.go index ecac59bf624..775102e4bae 100644 --- a/exchanges/stream/websocket.go +++ b/exchanges/stream/websocket.go @@ -50,7 +50,7 @@ var ( errWebsocketConnectorUnset = errors.New("websocket connector function not set") errWebsocketSubscriptionsGeneratorUnset = errors.New("websocket subscriptions generator function needs to be set") errClosedConnection = errors.New("use of closed network connection") - errSubscriptionNotFound = errors.New("subscription not found in list") + errSubscriptionNotFound = errors.New("subscription not found") errAlreadySubscribed = errors.New("already subscribed") errNoChannelsInArgs = errors.New("no channels in args") errKeyCannotBeNil = errors.New("key cannot be nil")