Skip to content

Commit a4b2a60

Browse files
Boryemayneyao
authored andcommitted
Update utils.py
修改前会报错:UnboundLocalError: local variable 'r' referenced before assignment 修改后可以正确显示错误码
1 parent 16cf8cf commit a4b2a60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vika/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def query_parse(field_key_map: FieldKeyMap, **kwargs):
6969

7070
def handle_response(resp, resp_class: Generic[T]) -> T:
7171
if resp.status_code >= 500:
72-
raise ServerError(f"API Server Error: {r.status_code}")
72+
raise ServerError(f"API Server Error: {resp.status_code}")
7373
try:
7474
r = resp.json()
7575
if r["success"]:

0 commit comments

Comments
 (0)