From e343eb7b0c223fd91adba80b900187a4de5e6dbe Mon Sep 17 00:00:00 2001 From: Maicol Battistini Date: Sun, 7 Jul 2024 11:51:03 +0000 Subject: [PATCH] fix: Status code not being a string --- safrs/safrs_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/safrs/safrs_api.py b/safrs/safrs_api.py index 362e955..17177f7 100755 --- a/safrs/safrs_api.py +++ b/safrs/safrs_api.py @@ -700,7 +700,7 @@ def method_wrapper(*args, **kwargs): detail = getattr(safrs_exception, "detail", title) safrs.DB.session.rollback() - errors = dict(title=title, detail=detail, code=api_code) - abort(str(status_code), errors=[errors]) + errors = dict(title=title, detail=detail, code=str(api_code)) + abort(status_code, errors=[errors]) return method_wrapper