diff --git a/src/bapi/resources/stats.py b/src/bapi/resources/stats.py index 934f491..0ac2074 100644 --- a/src/bapi/resources/stats.py +++ b/src/bapi/resources/stats.py @@ -24,6 +24,8 @@ def get(self): return jsonify(d) + except TimeoutError: + return jsonify({"error": "timed out"}) except Exception as E: abort(500, {"error": str(E)}) @@ -36,6 +38,8 @@ def get(self, id): try: return jsonify(util.fetch_server_status(id)) + except TimeoutError: + return jsonify({"error": "timed out"}) except Exception as E: abort(500, {"error": str(E)})