Spaces:
test-sj-crm
/
Runtime error

DmitrMakeev commited on
Commit
74c7798
1 Parent(s): 8cab7d2

Update google_db.py

Browse files
Files changed (1) hide show
  1. google_db.py +11 -1
google_db.py CHANGED
@@ -42,7 +42,17 @@ def save_db():
42
  globs.server_response = response.text
43
 
44
  # Проверяем статус ответа
45
- err = 1 if response.status_code == 200 else 0
 
 
 
 
 
 
 
 
 
 
46
 
47
  response_data = {
48
  "status": "success" if err == 1 else "error",
 
42
  globs.server_response = response.text
43
 
44
  # Проверяем статус ответа
45
+ if response.status_code == 200:
46
+ err = 1
47
+ else:
48
+ err = 0
49
+ response_data = {
50
+ "status": "error",
51
+ "err": err,
52
+ "message": "Operation failed",
53
+ "server_response": globs.server_response
54
+ }
55
+ return jsonify(response_data)
56
 
57
  response_data = {
58
  "status": "success" if err == 1 else "error",