Unverified Commit fba86b6b authored by fzyzcjy's avatar fzyzcjy Committed by GitHub
Browse files

Tiny improve error message (#5526)

parent 072b4d03
......@@ -324,7 +324,11 @@ class RuntimeEndpoint(BaseBackend):
def _assert_success(self, res):
if res.status_code != 200:
raise RuntimeError(res.json())
try:
content = res.json()
except json.JSONDecodeError:
content = res.text
raise RuntimeError(content)
def compute_normalized_prompt_logprobs(input_logprobs):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment