Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,9 +86,9 @@ def get_food_suggestions():
|
|
| 86 |
error_message = str(e)
|
| 87 |
if "429" in error_message or "insufficient_quota" in error_message.lower():
|
| 88 |
return jsonify({
|
| 89 |
-
"error":
|
| 90 |
}), 429
|
| 91 |
-
return jsonify({"error": f"
|
| 92 |
|
| 93 |
if __name__ == '__main__':
|
| 94 |
app.run(debug=True, host='0.0.0.0', port=7860)
|
|
|
|
| 86 |
error_message = str(e)
|
| 87 |
if "429" in error_message or "insufficient_quota" in error_message.lower():
|
| 88 |
return jsonify({
|
| 89 |
+
"error": "Unable to get recipe ideas. HTTP error! Status: 429. You exceeded your current OpenAI quota. Please upgrade your plan at https://platform.openai.com/account/billing or check the documentation at https://platform.openai.com/docs/guides/error-codes/api-errors."
|
| 90 |
}), 429
|
| 91 |
+
return jsonify({"error": f"Unable to get recipe ideas. {error_message}. Please contact support if the issue persists."}), 500
|
| 92 |
|
| 93 |
if __name__ == '__main__':
|
| 94 |
app.run(debug=True, host='0.0.0.0', port=7860)
|