You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following example flask app, we have a report that using capture() will not report the appropriate handlers that raised the error (when running on uwsgi). Using notify() solved this problem.
from flask import Flask, jsonify
from airbrake.notifier import Airbrake
app = Flask(__name__)
ab = Airbrake(project_id=2, api_key='5a00a5340e6cac4def2262adb4ded8a4', host="http://getexceptional.me.ab")
@app.errorhandler(Exception)
def handle_error(e):
ab.notify(e)
return jsonify(error=str(e)), 500
@app.route('/hello')
def hello_world():
raise Exception("Hello world failed")
return 'Hello, World!'
@app.route('/ping')
def ping():
raise Exception("ping failed")
return 'Ping!'
if __name__ == '__main__':
app.run()
The text was updated successfully, but these errors were encountered:
In the following example flask app, we have a report that using
capture()
will not report the appropriate handlers that raised the error (when running on uwsgi). Usingnotify()
solved this problem.The text was updated successfully, but these errors were encountered: