Skip to content

Commit de6937b

Browse files
committed
more messages
1 parent 7eacceb commit de6937b

File tree

3 files changed

+34
-15
lines changed

3 files changed

+34
-15
lines changed

services/web/server/src/simcore_service_webserver/users/_users_rest.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,32 +55,40 @@
5555
_TO_HTTP_ERROR_MAP: ExceptionToHttpErrorMap = {
5656
PendingPreRegistrationNotFoundError: HttpErrorInfo(
5757
status.HTTP_400_BAD_REQUEST,
58-
user_message(PendingPreRegistrationNotFoundError.msg_template),
58+
user_message(
59+
"No pending registration request found for email {email} in {product_name}.",
60+
_version=2,
61+
),
5962
),
6063
UserNotFoundError: HttpErrorInfo(
6164
status.HTTP_404_NOT_FOUND,
6265
user_message(
63-
"This user cannot be found. Either it is not registered or has enabled privacy settings."
66+
"The requested user could not be found. "
67+
"This may be because the user is not registered or has privacy settings enabled.",
68+
_version=1,
6469
),
6570
),
6671
UserNameDuplicateError: HttpErrorInfo(
6772
status.HTTP_409_CONFLICT,
6873
user_message(
69-
"Username '{user_name}' is already taken. "
70-
"Consider '{alternative_user_name}' instead."
74+
"The username '{user_name}' is already in use. "
75+
"Please try '{alternative_user_name}' instead.",
76+
_version=1,
7177
),
7278
),
7379
AlreadyPreRegisteredError: HttpErrorInfo(
7480
status.HTTP_409_CONFLICT,
7581
user_message(
76-
"Found {num_found} matches for '{email}'. Cannot pre-register existing user"
82+
"Found {num_found} existing account(s) for '{email}'. Unable to pre-register an existing user.",
83+
_version=1,
7784
),
7885
),
7986
MissingGroupExtraPropertiesForProductError: HttpErrorInfo(
8087
status.HTTP_503_SERVICE_UNAVAILABLE,
8188
user_message(
82-
"The product is not ready for use until the configuration is fully completed. "
83-
"Please wait and try again. "
89+
"This product is currently being configured and is not yet ready for use. "
90+
"Please try again later.",
91+
_version=1,
8492
),
8593
),
8694
}

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
from common_library.user_messages import user_message
44

55
MSG_PRICE_NOT_DEFINED_ERROR: Final[str] = user_message(
6-
"No payments are accepted until this product has a price"
6+
"Payments are not currently available for this product as pricing has not been configured.",
7+
_version=1,
78
)
89

910
MSG_BILLING_DETAILS_NOT_DEFINED_ERROR: Final[str] = user_message(
10-
"Payments cannot be processed: Required billing details (e.g. country for tax) are missing from your account."
11-
"Please contact support to resolve this configuration issue."
11+
"Unable to process payment because required billing information (such as country for tax purposes) is missing from your account. "
12+
"Please contact support to complete your billing setup.",
13+
_version=1,
1214
)

services/web/server/src/simcore_service_webserver/workspaces/_common/exceptions_handlers.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,36 @@
2222
_TO_HTTP_ERROR_MAP: ExceptionToHttpErrorMap = {
2323
WorkspaceGroupNotFoundError: HttpErrorInfo(
2424
status.HTTP_404_NOT_FOUND,
25-
user_message("Workspace {workspace_id} group {group_id} not found."),
25+
user_message(
26+
"The requested workspace {workspace_id} group {group_id} could not be found.",
27+
_version=1,
28+
),
2629
),
2730
WorkspaceAccessForbiddenError: HttpErrorInfo(
2831
status.HTTP_403_FORBIDDEN,
29-
user_message("Does not have access to this workspace"),
32+
user_message(
33+
"You do not have permission to access this workspace.", _version=1
34+
),
3035
),
3136
WorkspaceNotFoundError: HttpErrorInfo(
3237
status.HTTP_404_NOT_FOUND,
33-
user_message("Workspace not found. {reason}"),
38+
user_message(
39+
"The requested workspace could not be found. {reason}", _version=1
40+
),
3441
),
3542
# Trashing
3643
ProjectRunningConflictError: HttpErrorInfo(
3744
status.HTTP_409_CONFLICT,
3845
user_message(
39-
"One or more studies in this workspace are in use and cannot be trashed. Please stop all services first and try again"
46+
"Unable to delete workspace because one or more projects are currently running. Please stop all running services and try again.",
47+
_version=1,
4048
),
4149
),
4250
ProjectStoppingError: HttpErrorInfo(
4351
status.HTTP_503_SERVICE_UNAVAILABLE,
4452
user_message(
45-
"Something went wrong while stopping running services in studies within this workspace before trashing. Aborting trash."
53+
"Something went wrong while stopping running services in projects within this workspace before trashing. Aborting trash.",
54+
_version=1,
4655
),
4756
),
4857
}

0 commit comments

Comments
 (0)