You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportUsers() and getJob() returns promise of job object as expected. However, importUsers() returns a promise of IncomingMessage object[1]. This seems to be inconsistent.
To wait until the import job is completed, we need to get an ID of the job from the response. To do so, we need to parse the response body like const job = JSON.parse(resImportUsers.body).
It would be great if importUsers() returns a promise of job object as exportUsers() and getJob() do.
I'm being hit by this same problem (although I think the response is the axios response schema, so the response I actually care about is in the data field). I think it all can be fixed by doing something like this.
Description
exportUsers()
andgetJob()
returns promise of job object as expected. However,importUsers()
returns a promise of IncomingMessage object[1]. This seems to be inconsistent.To wait until the import job is completed, we need to get an ID of the job from the response. To do so, we need to parse the response body like
const job = JSON.parse(resImportUsers.body)
.It would be great if
importUsers()
returns a promise of job object asexportUsers()
andgetJob()
do.[1] https://github.com/auth0/node-auth0/blob/v2.23.0/src/management/JobsManager.js#L214
Reproduction
Environment
auth0@2.23.0
Node.js v10.15.3
,macOS 10.14
The text was updated successfully, but these errors were encountered: