better error handling

This commit is contained in:
wea_ondara
2024-04-18 15:50:24 +02:00
parent b311c9372a
commit 7bac6ed1a3
2 changed files with 6 additions and 1 deletions

View File

@@ -35,7 +35,8 @@ class Handler(http.server.BaseHTTPRequestHandler):
self.send_response(200)
self.end_headers()
self.wfile.write(json.dumps(response).encode("utf-8"))
except:
except Exception as e:
print(e)
self.send_response(400)
self.end_headers()