Skip to content

Commit

Permalink
fix(Tinebase/js): handle error log from message
Browse files Browse the repository at this point in the history
  • Loading branch information
ccheng-dev committed Jan 23, 2025
1 parent ce7e378 commit 351482b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tine20/Tinebase/js/ux/Direct/JsonRpcProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ Ext.ux.direct.JsonRpcProvider = Ext.extend(Ext.direct.RemotingProvider, {
if (e.status === 'failure') {
reject(e);
} else if (e.type === 'exception') {
const errorData = e.error.data;
const errorData = e?.error?.data ?? e.message;

//check for status code 650 (generic confirm)
if (errorData.code === 650) {
if (errorData?.code === 650) {
if (errorData.info) {
errorData.message += '<br />' + errorData.info;
}
Expand Down Expand Up @@ -121,7 +121,7 @@ Ext.ux.direct.JsonRpcProvider = Ext.extend(Ext.direct.RemotingProvider, {
}
});
} else {
reject (e.error);
reject (e?.error ?? e.message);
}
} else {
fulfill(result);
Expand Down

0 comments on commit 351482b

Please sign in to comment.