We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f663164 commit 9ac2134Copy full SHA for 9ac2134
1 file changed
openam-ui/openam-ui-js-sdk/src/lib/userService.ts
@@ -70,6 +70,10 @@ class UserService {
70
"Content-Type": "application/json"
71
},
72
})
73
+ if(!response.ok) {
74
+ const data = await response.json() as AuthError
75
+ throw new Error(data.message)
76
+ }
77
return await response.json();
78
} catch (e) {
79
if (import.meta.env.MODE === 'development') {
@@ -104,6 +108,10 @@ class UserService {
104
108
body: JSON.stringify(dataToUpdate),
105
109
}
106
110
)
111
112
113
114
107
115
116
117
0 commit comments