Skip to content

Commit

Permalink
Merge pull request #47059 from nyomanjyotisa/issue-46768
Browse files Browse the repository at this point in the history
Display sync error when connecting to NetSuite with invalid credentials
  • Loading branch information
tgolen authored Aug 19, 2024
2 parents 7b4605a + 716bd7c commit 78c20f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libs/actions/connections/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,10 @@ function getSynchronizationErrorMessage(policy: OnyxEntry<Policy>, connectionNam
const syncError = Localize.translateLocal('workspace.accounting.syncError', connectionName);
// NetSuite does not use the conventional lastSync object, so we need to check for lastErrorSyncDate
if (connectionName === CONST.POLICY.CONNECTIONS.NAME.NETSUITE) {
if (!isSyncInProgress && !!policy?.connections?.[CONST.POLICY.CONNECTIONS.NAME.NETSUITE].lastErrorSyncDate) {
if (
!isSyncInProgress &&
(!!policy?.connections?.[CONST.POLICY.CONNECTIONS.NAME.NETSUITE].lastErrorSyncDate || policy?.connections?.[CONST.POLICY.CONNECTIONS.NAME.NETSUITE]?.verified === false)
) {
return syncError;
}
return;
Expand Down

0 comments on commit 78c20f0

Please sign in to comment.