Skip to content

Commit e547cd1

Browse files
committed
fixes tests
1 parent 78bfc24 commit e547cd1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def create_data_response(data: Any, *, status: int = HTTP_200_OK) -> web.Respons
3636
return web.json_response(enveloped_payload, dumps=json_dumps, status=status)
3737

3838

39-
MAX_STATUS_MESSAGE_LENGTH: Final[int] = 50
39+
MAX_STATUS_MESSAGE_LENGTH: Final[int] = 100
4040

4141

4242
def safe_status_message(

services/web/server/src/simcore_service_webserver/director_v2/_controller/_rest_exceptions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ async def _handler_director_service_error_as_503_or_4xx(
3131
request: web.Request, exception: Exception
3232
) -> web.Response:
3333
"""
34-
Handles DirectorV2ServiceError exceptions by responding with
35-
- 503 Service Unavailable if the directorv2 reponds with a server error (5XX),
36-
- or bypass with the same error if it's a client error (4XX).
34+
Handles DirectorV2ServiceError exceptions by returning:
35+
- HTTP 503 Service Unavailable if the underlying director-v2 service returns a 5XX server error,
36+
- or the original 4XX client error status and message if it is a client error.
3737
"""
3838
assert isinstance(exception, DirectorV2ServiceError) # nosec
3939
assert status_codes_utils.is_error(

0 commit comments

Comments
 (0)