From dd2300e5ce9924132dc99bfc19abff9012a36d4c Mon Sep 17 00:00:00 2001 From: Dmitri Karpovich Date: Tue, 15 Aug 2023 00:51:40 +0200 Subject: [PATCH] [gateio-v4] Add error mapping --- .../main/java/org/knowm/xchange/gateio/GateioErrorAdapter.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xchange-gateio-v4/src/main/java/org/knowm/xchange/gateio/GateioErrorAdapter.java b/xchange-gateio-v4/src/main/java/org/knowm/xchange/gateio/GateioErrorAdapter.java index 805b38d07d9..169b4a2e99d 100644 --- a/xchange-gateio-v4/src/main/java/org/knowm/xchange/gateio/GateioErrorAdapter.java +++ b/xchange-gateio-v4/src/main/java/org/knowm/xchange/gateio/GateioErrorAdapter.java @@ -13,6 +13,7 @@ public class GateioErrorAdapter { public final String INVALID_CURRENCY = "INVALID_CURRENCY"; public final String BALANCE_NOT_ENOUGH = "BALANCE_NOT_ENOUGH"; public final String TOO_FAST = "TOO_FAST"; + public final String TOO_MANY_REQUESTS = "TOO_MANY_REQUESTS"; public final String INVALID_PARAM_VALUE = "INVALID_PARAM_VALUE"; public final String SERVER_ERROR = "SERVER_ERROR"; @@ -32,6 +33,7 @@ public ExchangeException adapt(GateioException e) { return new FundsExceededException(e.getMessage(), e); case TOO_FAST: + case TOO_MANY_REQUESTS: return new RateLimitExceededException(e.getMessage(), e); case SERVER_ERROR: