Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -331,10 +331,10 @@ CMD ["python", "app.py"]
|
|
331 |
"note": "It may take a few minutes to build and deploy."
|
332 |
}), 200
|
333 |
|
334 |
-
except json.JSONDecodeError:
|
335 |
-
|
336 |
-
except Exception as e:
|
337 |
-
|
338 |
@app.route('/docs', methods=['GET'])
|
339 |
def get_docs():
|
340 |
"""Return the API documentation as plain text."""
|
|
|
331 |
"note": "It may take a few minutes to build and deploy."
|
332 |
}), 200
|
333 |
|
334 |
+
except json.JSONDecodeError:
|
335 |
+
return jsonify({"error": "Invalid JSON format"}), 400
|
336 |
+
except Exception as e:
|
337 |
+
return jsonify({"error": str(e)}), 500
|
338 |
@app.route('/docs', methods=['GET'])
|
339 |
def get_docs():
|
340 |
"""Return the API documentation as plain text."""
|