SvelteKit - Failed to load resource: the server responded with a status of 500 ()

I have done some changes to my app, and since then I get this error message on CF Pages. Failed to load resource: the server responded with a status of 500 () - cart:1 Sadly on Pages, I'm not seeing any error message, so I"m unsure where's the problem, or how I can troubleshoot it. As the whole route was reworked, I tried to remove as much as possible, and I come to the following: In my +page.svelte, once I removed:
(FORM TAG)
method="POST"
action="?/cart"
(FORM TAG)
method="POST"
action="?/cart"
and from +page.server.js:
import { createInstance } from "$lib/js/pocketbase.js";
import { XX_XX, XX_XX } from "$env/static/private";

const pb = createInstance();

export async function load({}) {
const authData = await pb.collection(*****).authWithPassword(XX_XX, XX_XX);
authData;

return {
authData: pb.authStore.token,
};
}

export const actions = {
cart: async ({ request }) => {
const formData = await request.formData();
await pb.collection(*****).create(formData);
},
};
import { createInstance } from "$lib/js/pocketbase.js";
import { XX_XX, XX_XX } from "$env/static/private";

const pb = createInstance();

export async function load({}) {
const authData = await pb.collection(*****).authWithPassword(XX_XX, XX_XX);
authData;

return {
authData: pb.authStore.token,
};
}

export const actions = {
cart: async ({ request }) => {
const formData = await request.formData();
await pb.collection(*****).create(formData);
},
};
Any ideas how I could fix this issue?
1 Reply
Noam
Noam2mo ago
Did you solve this? I'm running into the same issue.
Want results from more Discord servers?
Add your server