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

bug: Request with GET/HEAD method cannot have body. #1031

Open
hckhanh opened this issue Apr 14, 2024 · 1 comment
Open

bug: Request with GET/HEAD method cannot have body. #1031

hckhanh opened this issue Apr 14, 2024 · 1 comment

Comments

@hckhanh
Copy link

hckhanh commented Apr 14, 2024

Provide environment information

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M2 Pro
    Memory: 571.42 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.1 - ~/Library/pnpm/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.5.0 - ~/Library/pnpm/npm
    pnpm: 8.15.4 - ~/Library/pnpm/pnpm
    bun: 1.1.2 - /opt/homebrew/bin/bun

Describe the bug

I try to access the trigger url from my server: http://localhost:3000/api/trigger
I know it does not support GET request for the api, but Is there any way that make the error does not sound like Internal error?

Reproduction repo

N/A

To reproduce

Create a new project and deploy with pages folder (nextjs 12). I am using trigger v2

pages/api/trigger.tsx

import { createPagesRoute } from "@trigger.dev/nextjs";
import { trigger } from "@utils/trigger";

import "@jobs/index";

// this route is used to send and receive data with Trigger.dev
const { handler, config } = createPagesRoute(trigger);

export { config };
export default handler;

Additional information

No response

@predam
Copy link

predam commented Apr 21, 2024

This may cause it
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants