diff --git a/src/api/miscellaneous/errors.py b/src/api/miscellaneous/errors.py index be40bedf41505d5ec0d858820a5750001480f41a..f88be8cd508020d7af52e9e7c7d35392676c13c7 100644 --- a/src/api/miscellaneous/errors.py +++ b/src/api/miscellaneous/errors.py @@ -1,8 +1,11 @@ import json from flask.wrappers import Response +import api from api.miscellaneous.constants import * +_SERVER_NAME = api.config["API_SERVER_NAME"] + class ApiError: @@ -21,7 +24,8 @@ class ApiClientException(Exception): def api_on_error(error: ApiError): error_json = { "error_code": error.error_code, - "message": error.message + "message": error.message, + "server": _SERVER_NAME } return Response(json.dumps(error_json), error.http_status_code, mimetype="application/json")