The code is straight forward. The request reaches the endpoint, but for some reason a call to flask.request.json/json()/get_json() makes the flow go to the exception state. Why is this happening? I’ve checked on the client slide to make sure the data is proper in the json and that the call is make correctly.
Here’s the code to the flask post request endpoint:
@app.route('/get-ai-resp', methods=["POST"])
def get_ai_resp():
try:
data = request.json
#print(data)
return jsonify({"name": "Nateeeee"})
except Exception as e:
print(f"function error our.\n{e}")
return jsonify({"error": "issueeee"})
Am I trippn and not seeing something or is there something else going on?