diff --git a/src/routes/(admin)/account/(menu)/billing/+page.server.ts b/src/routes/(admin)/account/(menu)/billing/+page.server.ts index f2ac1ca4..77de358e 100644 --- a/src/routes/(admin)/account/(menu)/billing/+page.server.ts +++ b/src/routes/(admin)/account/(menu)/billing/+page.server.ts @@ -18,6 +18,7 @@ export const load: PageServerLoad = async ({ user, }) if (idError || !customerId) { + console.error("Error creating customer id", idError) error(500, { message: "Unknown error. If issue persists, please contact us.", }) @@ -31,6 +32,7 @@ export const load: PageServerLoad = async ({ customerId, }) if (fetchErr) { + console.error("Error fetching subscription", fetchErr) error(500, { message: "Unknown error. If issue persists, please contact us.", }) diff --git a/src/routes/(admin)/account/(menu)/billing/manage/+page.server.ts b/src/routes/(admin)/account/(menu)/billing/manage/+page.server.ts index f7e11861..5b2b8c0e 100644 --- a/src/routes/(admin)/account/(menu)/billing/manage/+page.server.ts +++ b/src/routes/(admin)/account/(menu)/billing/manage/+page.server.ts @@ -19,6 +19,7 @@ export const load: PageServerLoad = async ({ user, }) if (idError || !customerId) { + console.error("Error creating customer id", idError) error(500, { message: "Unknown error (PCID). If issue persists, please contact us.", }) @@ -32,6 +33,7 @@ export const load: PageServerLoad = async ({ }) portalLink = portalSession?.url } catch (e) { + console.error("Error creating billing portal session", e) error(500, "Unknown error (PSE). If issue persists, please contact us.") } diff --git a/src/routes/(admin)/account/+layout.server.ts b/src/routes/(admin)/account/+layout.server.ts index 13000263..2a119747 100644 --- a/src/routes/(admin)/account/+layout.server.ts +++ b/src/routes/(admin)/account/+layout.server.ts @@ -5,6 +5,7 @@ export const load: LayoutServerLoad = async ({ cookies, }) => { // Session here is from authGuard hook + return { session, cookies: cookies.getAll(), diff --git a/src/routes/(admin)/account/api/+page.server.ts b/src/routes/(admin)/account/api/+page.server.ts index c3846efc..498570e0 100644 --- a/src/routes/(admin)/account/api/+page.server.ts +++ b/src/routes/(admin)/account/api/+page.server.ts @@ -23,6 +23,7 @@ export const actions = { .eq("id", session.user.id) if (error) { + console.error("Error updating subscription status", error) return fail(500, { message: "Failed to update subscription status" }) } @@ -62,6 +63,7 @@ export const actions = { const { error } = await supabase.auth.updateUser({ email: email }) if (error) { + console.error("Error updating email", error) return fail(500, { errorMessage: "Unknown error. If this persists please contact us.", email, @@ -160,6 +162,7 @@ export const actions = { password: newPassword1, }) if (error) { + console.error("Error updating password", error) return fail(500, { errorMessage: "Unknown error. If this persists please contact us.", newPassword1, @@ -210,6 +213,7 @@ export const actions = { true, ) if (error) { + console.error("Error deleting user", error) return fail(500, { errorMessage: "Unknown error. If this persists please contact us.", currentPassword, @@ -286,6 +290,7 @@ export const actions = { .select() if (error) { + console.error("Error updating profile", error) return fail(500, { errorMessage: "Unknown error. If this persists please contact us.", fullName, diff --git a/src/routes/(admin)/account/subscribe/[slug]/+page.server.ts b/src/routes/(admin)/account/subscribe/[slug]/+page.server.ts index 6d06d752..93da852a 100644 --- a/src/routes/(admin)/account/subscribe/[slug]/+page.server.ts +++ b/src/routes/(admin)/account/subscribe/[slug]/+page.server.ts @@ -28,6 +28,7 @@ export const load: PageServerLoad = async ({ user, }) if (idError || !customerId) { + console.error("Error creating customer id", idError) error(500, { message: "Unknown error. If issue persists, please contact us.", }) @@ -57,6 +58,7 @@ export const load: PageServerLoad = async ({ }) checkoutUrl = stripeSession.url } catch (e) { + console.error("Error creating checkout session", e) error(500, "Unknown Error (SSE): If issue persists please contact us.") } diff --git a/src/routes/(marketing)/contact_us/+page.server.ts b/src/routes/(marketing)/contact_us/+page.server.ts index c933b528..c7ce5c7e 100644 --- a/src/routes/(marketing)/contact_us/+page.server.ts +++ b/src/routes/(marketing)/contact_us/+page.server.ts @@ -47,7 +47,6 @@ export const actions = { errors["message"] = "Message too long (" + message.length + " of 2000)" } - console.log("errors:", errors) if (Object.keys(errors).length > 0) { return fail(400, { errors }) } @@ -66,6 +65,7 @@ export const actions = { }) if (insertError) { + console.error("Error saving contact request", insertError) return fail(500, { errors: { _: "Error saving" } }) }