Skip to content

Commit 2f8e167

Browse files
committed
Normalize error message formatting for consistent substring matching across cloud and local servers
1 parent 89c3363 commit 2f8e167

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pyoverkiz/response_handler.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,8 @@ async def check_response(response: ClientResponse) -> None:
134134
error_code = result.get("errorCode", "")
135135

136136
if error_code:
137-
# Error messages between cloud and local Overkiz servers can be slightly different.
138-
# To make it easier to have a strict match for these errors, we remove the double quotes and the period at the end.
139-
140-
# An error message can have an empty (None) message
137+
# Error messages between cloud and local servers differ slightly in quoting and punctuation.
138+
# Normalise so substring matching works across both variants.
141139
message = message.strip('".') if (message := result.get("error")) else ""
142140

143141
# 1. Primary dispatch: match on errorCode (+ optional message substring)

0 commit comments

Comments
 (0)