Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.tickets.create return Error: Request processing failed: Raw request failed: FormData is not defined #417

Open
ia-kaishen opened this issue Jun 28, 2024 · 0 comments
Labels

Comments

@ia-kaishen
Copy link

ia-kaishen commented Jun 28, 2024

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/[email protected]/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.

@ia-kaishen ia-kaishen added the bug label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant