@jsb188/app 1.1.7 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/constants/app.ts +1 -1
- package/src/i18n/error.ts +4 -2
- package/src/i18n/form.ts +1 -0
- package/src/utils/api.ts +2 -2
package/package.json
CHANGED
package/src/constants/app.ts
CHANGED
package/src/i18n/error.ts
CHANGED
|
@@ -5,7 +5,8 @@ export default {
|
|
|
5
5
|
network_error_title: 'Network error',
|
|
6
6
|
server_outage_title: 'Service disruption',
|
|
7
7
|
server_outage_msg: 'Our servers are experiencing a disruption or we may be deploying an update. Please try again in a moment.',
|
|
8
|
-
unknown_error: '
|
|
8
|
+
unknown_error: 'Unknown error',
|
|
9
|
+
unknown_error_msg: 'An unknown error occured.',
|
|
9
10
|
network_error: 'Failed to connect to server.\nPlease try again in a moment.',
|
|
10
11
|
network_error_msg: 'Failed to connect to server. Please check if your\n internet connection is stable.',
|
|
11
12
|
app_error_title: 'App crashed',
|
|
@@ -132,7 +133,8 @@ export default {
|
|
|
132
133
|
30024: 'Stripe customer and payment method was mismatched.',
|
|
133
134
|
30025: 'E-mail server is experiencing an outage. Please try again in a moment.',
|
|
134
135
|
30028: 'You cannot send an empty message.',
|
|
135
|
-
|
|
136
|
+
'30031_title': 'Upload failed',
|
|
137
|
+
30031: 'There was an issue while uploading your file.\n Please try again in a moment.',
|
|
136
138
|
|
|
137
139
|
// Form errors
|
|
138
140
|
|
package/src/i18n/form.ts
CHANGED
package/src/utils/api.ts
CHANGED
|
@@ -74,13 +74,13 @@ export function normalizeServerError(error?: any): ServerErrorObj {
|
|
|
74
74
|
if (i18nErrCodeExists(errorCode)) {
|
|
75
75
|
message = i18n.t(`error.${errorCode}`, { value: errorValue, smart_count: Number(errorValue) });
|
|
76
76
|
} else {
|
|
77
|
-
message = i18n.t('error.
|
|
77
|
+
message = i18n.t('error.unknown_error_msg');
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
if (
|
|
82
82
|
getENVVariable('NODE_ENV') === 'development' &&
|
|
83
|
-
message === i18n.t('error.
|
|
83
|
+
message === i18n.t('error.unknown_error_msg')
|
|
84
84
|
) {
|
|
85
85
|
// Log for development so I can see what went wrong
|
|
86
86
|
console.warn(error);
|