Skip to content

Commit 0bca37b

Browse files
committed
IDEV-2020: Make "Limit Exceeded" the default reason.
1 parent 711418d commit 0bca37b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

domaintools/base_results.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ def check_limit_exceeded(self):
154154
if isinstance(self._data, dict) and (
155155
"response" in self._data and "limit_exceeded" in self._data["response"] and self._data["response"]["limit_exceeded"] is True
156156
):
157-
limit_exceeded, reason = True, f"Limit Exceeded: {self._data['response']['message']}"
157+
limit_exceeded, reason = True, self._data["response"]["message"]
158158
elif "response" in self._data and "limit_exceeded" in self._data:
159-
limit_exceeded, reason = True, "Limit Exceeded"
159+
limit_exceeded = True
160160

161161
if limit_exceeded:
162-
raise ServiceException(503, reason)
162+
raise ServiceException(503, f"Limit Exceeded {reason}")
163163

164164
@property
165165
def status(self):

0 commit comments

Comments
 (0)