flask application starts correctly but shows an error once logged-in

Solution
@http.route("/cast")
@jwt_required()
def index():
    # ...