We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f699d11 commit 0270fc1Copy full SHA for 0270fc1
1 file changed
singlestoredb/http/connection.py
@@ -569,8 +569,10 @@ def _execute(
569
570
if res.status_code >= 400:
571
if res.text:
572
- if re.match(r'^Error\s+\d+:', res.text):
573
- code, msg = res.text.split(':', 1)
+ m = re.match(r'^Error\s+(\d+).*?:', res.text)
+ if m:
574
+ code = m.group(1)
575
+ msg = res.text.split(':', 1)[-1]
576
icode = int(code.split()[-1])
577
else:
578
icode = res.status_code
0 commit comments