@opexa/portal-components 0.0.861 → 0.0.863
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.
|
@@ -71,9 +71,7 @@ export function useCamera(options = {}) {
|
|
|
71
71
|
}
|
|
72
72
|
setError({
|
|
73
73
|
name: 'CameraError',
|
|
74
|
-
message:
|
|
75
|
-
? e.message
|
|
76
|
-
: 'Failed to open camera. Please try again.',
|
|
74
|
+
message: 'Failed to open camera. Check your device settings and try again.',
|
|
77
75
|
});
|
|
78
76
|
}
|
|
79
77
|
finally {
|
|
@@ -107,7 +105,7 @@ export function useCamera(options = {}) {
|
|
|
107
105
|
catch (e) {
|
|
108
106
|
setError({
|
|
109
107
|
name: 'CameraError',
|
|
110
|
-
message:
|
|
108
|
+
message: 'Failed to open native camera. Check your device settings and try again.',
|
|
111
109
|
});
|
|
112
110
|
setSnapping(false);
|
|
113
111
|
return null;
|
|
@@ -122,9 +122,12 @@ export function MobileNumberSignIn() {
|
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
124
|
onError: (err) => {
|
|
125
|
+
const errorMessage = err.name === 'Forbidden'
|
|
126
|
+
? 'Please enter the correct verification code'
|
|
127
|
+
: err.message;
|
|
125
128
|
toaster.error({
|
|
126
129
|
title: 'Sign In Failed',
|
|
127
|
-
description:
|
|
130
|
+
description: errorMessage,
|
|
128
131
|
});
|
|
129
132
|
},
|
|
130
133
|
});
|