diff --git a/lib/js-api/src/alfrescoApi.ts b/lib/js-api/src/alfrescoApi.ts index 33daa63b0f6..f46975c506b 100644 --- a/lib/js-api/src/alfrescoApi.ts +++ b/lib/js-api/src/alfrescoApi.ts @@ -207,7 +207,7 @@ export class AlfrescoApi implements Emitter, AlfrescoApiType { /**@private? */ errorHandler(error: { status?: number }) { - if (error.status === 401) { + if (this.config.oauthInit && error.status === 401) { this.invalidateSession(); }