const eFormData = pipe(
Effect.tryPromise(() => superValidate(request, effect(schema))), // <- superValidate is a promise that should never reject, it uses "valid" to define errors
Effect.filterOrFail((f) => f.valid),
Effect.andThen(f => supabase.auth.signUp(f.data)), // <- this one should be providing an error code and error value which seems fine, but if I add a tap(d => console.log("plz"))
Effect.filterOrFail((f) => !f.error) // here it wont make it! I previously attempted to use another tryPromise + flatMap to no change
)
Effect.runPromise(eFormData)
.catch(() => redirect(303, '/auth/error'))
.then(() => redirect(303, '/'))
const eFormData = pipe(
Effect.tryPromise(() => superValidate(request, effect(schema))), // <- superValidate is a promise that should never reject, it uses "valid" to define errors
Effect.filterOrFail((f) => f.valid),
Effect.andThen(f => supabase.auth.signUp(f.data)), // <- this one should be providing an error code and error value which seems fine, but if I add a tap(d => console.log("plz"))
Effect.filterOrFail((f) => !f.error) // here it wont make it! I previously attempted to use another tryPromise + flatMap to no change
)
Effect.runPromise(eFormData)
.catch(() => redirect(303, '/auth/error'))
.then(() => redirect(303, '/'))