From d92c368ac9cf6889bac7766640ebf52db4c46b2b Mon Sep 17 00:00:00 2001 From: Cody Baker Date: Tue, 28 May 2024 00:04:14 -0400 Subject: [PATCH] remove errorhandlers --- src/pyflask/namespaces/data.py | 7 ------- src/pyflask/namespaces/neuroconv.py | 6 ------ 2 files changed, 13 deletions(-) diff --git a/src/pyflask/namespaces/data.py b/src/pyflask/namespaces/data.py index 478316cf3..246c67b86 100644 --- a/src/pyflask/namespaces/data.py +++ b/src/pyflask/namespaces/data.py @@ -7,13 +7,6 @@ data_namespace = Namespace(name="data", description="API route for dataset generation in the NWB GUIDE.") - -@data_namespace.errorhandler(Exception) -def exception_handler(error): - exceptiondata = traceback.format_exception(type(error), error, error.__traceback__) - return {"message": exceptiondata[-1], "traceback": "".join(exceptiondata)} - - generate_test_data_parser = reqparse.RequestParser() generate_test_data_parser.add_argument("output_path", type=str, required=True) diff --git a/src/pyflask/namespaces/neuroconv.py b/src/pyflask/namespaces/neuroconv.py index dbbf9fe4f..533103a49 100644 --- a/src/pyflask/namespaces/neuroconv.py +++ b/src/pyflask/namespaces/neuroconv.py @@ -30,12 +30,6 @@ parser.add_argument("interfaces", type=str, action="split", help="Interfaces cannot be converted") -@neuroconv_namespace.errorhandler(Exception) -def exception_handler(error): - exceptiondata = traceback.format_exception(type(error), error, error.__traceback__) - return {"message": exceptiondata[-1], "traceback": "".join(exceptiondata)} - - @neuroconv_namespace.route("/") class AllInterfaces(Resource): @neuroconv_namespace.doc(responses={200: "Success", 400: "Bad Request", 500: "Internal server error"})