Open
Description
Describe the Bug
I calling the create ticket function in nodejs, but I received the error message:
Error: Request processing failed: Raw request failed: FormData is not defined
Example Code
const client = createClient({
username: env.ZENDESK_USER,
token: env.ZENDESK_API,
subdomain: env.ZENDESK_SUBDOMAIN,
});
// const ticket = prepareTicketBody(message, user);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// const result = await client.tickets.create(ticket);
const newTicket = await client.tickets.create({ subject: 'New ticket', description: 'Ticket description' });
return newTicket;
Expected Behavior
ticket can create successfully.
Actual Behavior
Code return runtime error say FormData not found.
Error: Request processing failed: Raw request failed: FormData is not defined
at Re.request (/Users/involveasia/Backend/link-tool-api/src/node_modules/.pnpm/node-zendesk@5.0.12/node_modules/node-zendesk/dist/index.js:1:15302)
Environment Information
node-zendesk
version: 5.0.12- Node.js version: 18.20.0
- Operating System: macos 13.6.6 (22G630)
- Any other relevant software versions?
Additional Context
Add any other context about the problem here.