From e69def2bcd4c524cfa258a50a89401d4eefc5038 Mon Sep 17 00:00:00 2001 From: Maicol Battistini Date: Sun, 7 Jul 2024 01:18:18 +0200 Subject: [PATCH] Fix status code not being a string See specs: https://jsonapi.org/format/#error-objects --- safrs/safrs_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/safrs/safrs_api.py b/safrs/safrs_api.py index 174b8b2..362e955 100755 --- a/safrs/safrs_api.py +++ b/safrs/safrs_api.py @@ -701,6 +701,6 @@ def method_wrapper(*args, **kwargs): safrs.DB.session.rollback() errors = dict(title=title, detail=detail, code=api_code) - abort(status_code, errors=[errors]) + abort(str(status_code), errors=[errors]) return method_wrapper