Fix error for html client response handling
This commit is contained in:
@@ -61,7 +61,7 @@ class HtmlClient {
|
||||
|
||||
onError(error) {
|
||||
const response = error.response;
|
||||
if (response.data) {
|
||||
if (response && response.data && response.data.code) {
|
||||
switch (response.data.code) {
|
||||
case 'rest_missing_callback_param':
|
||||
store.dispatch(updateMessages([{code:'error', message: response.data.message }]));
|
||||
|
||||
Reference in New Issue
Block a user