Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
BenjaminGroff
Contributor III
Contributor III

Enigma OpenDoc() unhandled promise rejection

I'm using Enigma js with Node and connecting to Qlik through a websocket on one of our servers. My script loops through a list of apps and exports their data, but some apps in the list have section access that our service account does not have access to which results in an openDoc error code 5 being returned. I am trying to write my script so when that error happens it will just continue on to the next app. I am not trying to bypass the section access, just skip the apps I don't have access to!

I am calling openDoc with the .catch() method attached but it is still stopping the script based on a "UnhandledPromiseRejectionWarning". Does anyone have any insight on how I can fix this issue? The script does run successfully for all apps the account has access to. Also, on error nothing is being written to the log file.

Imports:

BenjaminGroff_0-1677776847371.png

Code:

BenjaminGroff_1-1677776881853.png

Error:

BenjaminGroff_2-1677776893454.png

 

Labels (1)
  • API

1 Solution

Accepted Solutions
BenjaminGroff
Contributor III
Contributor III
Author

Figured it out. There was an issue with the string I was writing to the log file.

View solution in original post

1 Reply
BenjaminGroff
Contributor III
Contributor III
Author

Figured it out. There was an issue with the string I was writing to the log file.