oscklm
oscklm2y ago

Getting an error when clicking on my http action in the dashboard?

Hello, I'm getting an error when clicking on my http action in the dashboard. Any idea how to solve this?
// convex/http/mux/videoReadyHandler.ts
import { httpAction } from "@/_generated/server";


export const videoReadyHandler = httpAction(async (ctx, request) => {
const { body } = await request.json();

// TODO: Handle the video ready event

return new Response("Successfully handled the videoReady from MUX", {
status: 200,
});
});
// convex/http/mux/videoReadyHandler.ts
import { httpAction } from "@/_generated/server";


export const videoReadyHandler = httpAction(async (ctx, request) => {
const { body } = await request.json();

// TODO: Handle the video ready event

return new Response("Successfully handled the videoReady from MUX", {
status: 200,
});
});
// convex/http.ts
import { httpRouter } from "convex/server";
import { videoReadyHandler } from "./http/mux/videoReadyHandler";

const http = httpRouter();

http.route({
path: "/mux/video-ready",
method: "POST",
handler: videoReadyHandler,
});

// Convex expects the router to be the default export of `convex/http.js`.
export default http;
// convex/http.ts
import { httpRouter } from "convex/server";
import { videoReadyHandler } from "./http/mux/videoReadyHandler";

const http = httpRouter();

http.route({
path: "/mux/video-ready",
method: "POST",
handler: videoReadyHandler,
});

// Convex expects the router to be the default export of `convex/http.js`.
export default http;
No description
3 Replies
oscklm
oscklmOP2y ago
When clicking this one, to be more specific.
No description
sshader
sshader2y ago
I can reproduce this -- thanks for the report! Working on a fix
oscklm
oscklmOP2y ago
Awesome! I also don't seem to be able to post a request to it via my dev deployment URL. Getting "404 page not found" back when calling ​https://********.cloud/mux/video-ready not sure if thats related to the function, also not being accessable via the dashboard Ahh that's me sleeping. Had to change .cloud to .convex.site

Did you find this page helpful?