Skip to content

Commit e1e3e42

Browse files
committed
revert
1 parent 15df825 commit e1e3e42

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
from common_library.error_codes import ErrorCodeStr
99
from common_library.json_serialization import json_dumps
1010
from models_library.rest_error import ErrorGet, ErrorItemType
11+
from servicelib.rest_constants import RESPONSE_MODEL_POLICY
1112

1213
from ..aiohttp.status import HTTP_200_OK
1314
from ..mimetype_constants import MIMETYPE_APPLICATION_JSON
14-
from ..rest_constants import RESPONSE_MODEL_POLICY
1515
from ..rest_responses import is_enveloped
1616
from ..status_codes_utils import get_code_description
1717

@@ -54,7 +54,7 @@ def create_http_error(
5454
http_error_cls: type[HTTPError] = web.HTTPInternalServerError,
5555
*,
5656
skip_internal_error_details: bool = False,
57-
error_code: ErrorCodeStr | None = None,
57+
error_code: ErrorCodeStr | None = None
5858
) -> HTTPError:
5959
"""
6060
- Response body conforms OAS schema model
@@ -90,8 +90,9 @@ def create_http_error(
9090
payload = wrap_as_envelope(
9191
error=error.model_dump(mode="json", **RESPONSE_MODEL_POLICY)
9292
)
93+
9394
return http_error_cls(
94-
# NOTE: reason cannot contain new lines
95+
# Multiline not allowed in HTTP reason
9596
reason=reason.replace("\n", " ") if reason else None,
9697
text=json_dumps(
9798
payload,

0 commit comments

Comments
 (0)