From b707cb8c02908c975520f532c0fc09c880bfd029 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 27 Aug 2024 11:34:06 +0300 Subject: Return the correct status error code for url errors. * gn3/errors.py (url_server_error): Return a 500 http status code for URL server errors. Signed-off-by: Munyoki Kilyungi --- gn3/errors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gn3/errors.py b/gn3/errors.py index e9056d4..525d703 100644 --- a/gn3/errors.py +++ b/gn3/errors.py @@ -51,7 +51,7 @@ def url_server_error(pnf): return jsonify(add_trace(pnf, { "error": f"URLLib Error no: {pnf.reason.errno}", "error_description": pnf.reason.strerror, - })) + })), 500 def handle_authorisation_error(exc: AuthorisationError): -- cgit v1.2.3