mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-14 23:16:49 +00:00
exchanges: make ErrPairNotFound an exportable error
Stop erroring out when receiving execution reports from currency pairs that have not been enabled.
This commit is contained in:
@@ -47,6 +47,9 @@ var (
|
||||
|
||||
errEndpointStringNotFound = errors.New("endpoint string not found")
|
||||
errTransportNotSet = errors.New("transport not set, cannot set timeout")
|
||||
|
||||
// ErrPairNotFound is an error message for when unable to find a currency pair
|
||||
ErrPairNotFound = errors.New("pair not found")
|
||||
)
|
||||
|
||||
func (b *Base) checkAndInitRequester() {
|
||||
@@ -458,7 +461,8 @@ func (b *Base) GetRequestFormattedPairAndAssetType(p string) (currency.Pair, ass
|
||||
}
|
||||
}
|
||||
}
|
||||
return response, "", errors.New("pair not found: " + p)
|
||||
return response, "",
|
||||
fmt.Errorf("%s %w", p, ErrPairNotFound)
|
||||
}
|
||||
|
||||
// GetAvailablePairs is a method that returns the available currency pairs
|
||||
|
||||
Reference in New Issue
Block a user