Skip to content

Commit 4aff75a

Browse files
committed
cleanup
1 parent 38b04ee commit 4aff75a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/service-library/src/servicelib/aiohttp/rest_middlewares.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from .typing_extension import Handler, Middleware
3232

3333
DEFAULT_API_VERSION = "v0"
34-
_FMSG_INTERNAL_ERROR_USER_FRIENDLY = (
34+
_FMSG_INTERNAL_ERROR_USER_FRIENDLY_WITH_OEC = (
3535
"We apologize for the inconvenience."
3636
" Our team has recorded the issue [{error_code}] and is working to resolve it as quickly as possible."
3737
" Thank you for your patience"
@@ -62,7 +62,9 @@ def _process_and_raise_unexpected_error(request: web.BaseRequest, err: Exception
6262
if isinstance(err, OsparcErrorMixin):
6363
error_context.update(err.error_context())
6464

65-
frontend_msg = _FMSG_INTERNAL_ERROR_USER_FRIENDLY.format(error_code=error_code)
65+
frontend_msg = _FMSG_INTERNAL_ERROR_USER_FRIENDLY_WITH_OEC.format(
66+
error_code=error_code
67+
)
6668
log_msg = create_troubleshotting_log_message(
6769
message_to_user=frontend_msg,
6870
error=err,

packages/service-library/tests/aiohttp/test_rest_middlewares.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from models_library.utils.json_serialization import json_dumps
1717
from servicelib.aiohttp import status
1818
from servicelib.aiohttp.rest_middlewares import (
19-
_FMSG_INTERNAL_ERROR_USER_FRIENDLY,
19+
_FMSG_INTERNAL_ERROR_USER_FRIENDLY_WITH_OEC,
2020
envelope_middleware_factory,
2121
error_middleware_factory,
2222
)
@@ -239,7 +239,7 @@ async def test_raised_unhandled_exception(
239239
assert "OEC" in error["message"]
240240
parsed_oec = parse_error_code(error["message"]).pop()
241241
assert (
242-
_FMSG_INTERNAL_ERROR_USER_FRIENDLY.format(error_code=parsed_oec)
242+
_FMSG_INTERNAL_ERROR_USER_FRIENDLY_WITH_OEC.format(error_code=parsed_oec)
243243
== error["message"]
244244
)
245245

0 commit comments

Comments
 (0)