INNER CODE UNIT · Python
handle_404
giuseppe99barchetta/SuggestArr · api_service/app.py:163
def handle_404(exc):
return jsonify({"error": "Not found"}), 404
@application.errorhandler(429)
def handle_429(exc):
return jsonify({"error": "Too many requests — please try again later"}), 429
@application.errorhandler(500)
def handle_500(exc):
logger.error("Unhandled internal error: %s", exc, exc_info=True)
return jsonify({"error": "Internal server error"}), 500
# ------------------------------------------------------------------
# Blueprint registration
# ------------------------------------------------------------------
application.register_blueprint(auth_bp, url_prefix='/api/auth')
application.register_blueprint(jellyfin_bp, url_prefix='/api/jellyfin')
application.register_blueprint(seer_bp, url_prefix='/api/seer')