Closed avinash9shelke closed 10 months ago
Getting the below issue - 2023-10-25T07:48:00.285Z 3e74e6f8-3e5f-4dcf-99fe-50d8782b7e61 INFO ManagementApiError: Payload validation error: 'Invalid multipart payload format'. at JobsManager.parseError (/opt/nodejs/node_modules/auth0/dist/cjs/management/management-client.js:33:16) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async JobsManager.request (/opt/nodejs/node_modules/auth0/dist/cjs/lib/runtime.js:119:23) at async JobsManager.importUsers (/opt/nodejs/node_modules/auth0/dist/cjs/management/__generated/managers/jobs-manager.js:103:26) at async importUsers (/var/task/backup_restore/auth0-utils.js:64:12) at async importUserData (/var/task/backup_restore/restore/RestoreHumanService.js:132:21) at async restore (/var/task/backup_restore/restore/RestoreHumanService.js:50:5) at async exports.handler (/var/task/backup_restore/restore/handler.js:16:24) { errorCode: 'invalid_body', error: 'Bad Request', statusCode: 400, body: {"statusCode":400,"error":"Bad Request","message":"Payload validation error: 'Invalid multipart payload format'.","errorCode":"invalid_body"}, headers: HeadersList { cookies: null, [Symbol(headers map)]: Map(19) { 'date' => [Object], 'content-type' => [Object], 'content-length' => [Object], 'connection' => [Object], 'cf-ray' => [Object], 'cf-cache-status' => [Object], 'cache-control' => [Object], 'strict-transport-security' => [Object], 'vary' => [Object], 'access-control-expose-headers' => [Object], 'ot-baggage-auth0-request-id' => [Object], 'ot-tracer-sampled' => [Object], 'ot-tracer-spanid' => [Object], 'ot-tracer-traceid' => [Object], 'traceparent' => [Object], 'tracestate' => [Object], 'x-content-type-options' => [Object], 'server' => [Object], 'alt-svc' => [Object] },
}, msg: "Payload validation error: 'Invalid multipart payload format'." }
Hi @avinash9shelke - thanks for raising this
importUsers
takes a Blob
(not a ReadStream
) - more information, including an example, here https://github.com/auth0/node-auth0/blob/master/v4_MIGRATION_GUIDE.md#import-users-now-takes-a-blob
Closing, as I think this was answered. Can always reopen if needed.
Checklist
Description
Reproduction
1 . call
const job = await importUsers(management, connectionId);
Additional context
No response
node-auth0 version
4.0.1
Node.js version
18