Skip to content

Commit 8f1c4e3

Browse files
committed
improves error
1 parent c758028 commit 8f1c4e3

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

services/web/server/src/simcore_service_webserver/studies_dispatcher/_constants.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
"Please try later or login with a registered account."
2828
)
2929

30-
MSG_UNEXPECTED_ERROR: Final[
31-
str
32-
] = "Opps this is embarrasing! Something went really wrong {hint}"
30+
MSG_UNEXPECTED_DISPATCH_ERROR: Final[str] = (
31+
"Sorry, but looks like something unexpected went wrong!<br/>"
32+
"We track these errors automatically, but if the problem persists feel free to contact us. "
33+
"In the meantime, try refreshing."
34+
)

services/web/server/src/simcore_service_webserver/studies_dispatcher/_redirects_handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from ..utils import compose_support_error_msg
2424
from ..utils_aiohttp import create_redirect_to_page_response
2525
from ._catalog import ValidService, validate_requested_service
26-
from ._constants import MSG_UNEXPECTED_ERROR
26+
from ._constants import MSG_UNEXPECTED_DISPATCH_ERROR
2727
from ._core import validate_requested_file, validate_requested_viewer
2828
from ._errors import InvalidRedirectionParams, StudyDispatcherError
2929
from ._models import FileParams, ServiceInfo, ServiceParams, ViewerInfo
@@ -127,7 +127,7 @@ async def wrapper(request: web.Request) -> web.StreamResponse:
127127
error_code = create_error_code(err)
128128

129129
user_error_msg = compose_support_error_msg(
130-
msg=MSG_UNEXPECTED_ERROR.format(hint=""), error_code=error_code
130+
msg=MSG_UNEXPECTED_DISPATCH_ERROR, error_code=error_code
131131
)
132132
_logger.exception(
133133
**create_troubleshotting_log_kwargs(

services/web/server/src/simcore_service_webserver/studies_dispatcher/_studies_access.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
MSG_PROJECT_NOT_PUBLISHED,
4949
MSG_PUBLIC_PROJECT_NOT_PUBLISHED,
5050
MSG_TOO_MANY_GUESTS,
51-
MSG_UNEXPECTED_ERROR,
51+
MSG_UNEXPECTED_DISPATCH_ERROR,
5252
)
5353
from ._errors import GuestUsersLimitError
5454
from ._users import create_temporary_guest_user, get_authorized_user
@@ -260,7 +260,7 @@ async def wrapper(request: web.Request) -> web.StreamResponse:
260260
except Exception as err:
261261
error_code = create_error_code(err)
262262
user_error_msg = compose_support_error_msg(
263-
msg=MSG_UNEXPECTED_ERROR.format(hint=""), error_code=error_code
263+
msg=MSG_UNEXPECTED_DISPATCH_ERROR, error_code=error_code
264264
)
265265
_logger.exception(
266266
**create_troubleshotting_log_kwargs(
@@ -366,7 +366,7 @@ async def get_redirection_to_study_page(request: web.Request) -> web.Response:
366366
except Exception as exc: # pylint: disable=broad-except
367367
error_code = create_error_code(exc)
368368

369-
user_error_msg = MSG_UNEXPECTED_ERROR.format(hint="while copying your study")
369+
user_error_msg = MSG_UNEXPECTED_DISPATCH_ERROR
370370
_logger.exception(
371371
**create_troubleshotting_log_kwargs(
372372
user_error_msg,

0 commit comments

Comments
 (0)