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