Flask API: what’s the best way to handle exceptions?

Solution
@bp.route("", methods=["POST"])
@login_required
def new_paper():
    req = request.json
    try:
        cleaned_data = CreateUpdatePaperSchema(unknown=EXCLUDE).load(req)
    except ValidationError as err:
        return err_response(err_msg=fmt_validate_err(err), status_code=400)
@app.errorhandler(Exception)
def handle_exception(exc):
    db.session.rollback()

    app.logger.error(exc, exc_info=True)
    err_msg = "Something went wrong"
    return err_response(err_msg=err_msg, status_code=500)