MCPcopy Create free account
hub / github.com/dialect-app/dialect / check_known_errors

Method check_known_errors

dialect/providers/modules/bing.py:134–146  ·  view source on GitHub ↗
(self, status, data)

Source from the content-addressed store, hash-verified

132 raise UnexpectedError from exc
133
134 def check_known_errors(self, status, data):
135 if not data:
136 raise UnexpectedError("Response is empty!")
137
138 if "errorMessage" in data:
139 error = data["errorMessage"]
140 code = data["statusCode"]
141
142 match code:
143 case _:
144 raise ProviderError(error)
145
146 return None

Callers

nothing calls this directly

Calls 2

UnexpectedErrorClass · 0.90
ProviderErrorClass · 0.90

Tested by

no test coverage detected