@tuturuuu/utils/effect
@tuturuuu/utils/effect is the platform entrypoint for Effect.
It keeps Effect adoption consistent across Tuturuuu apps and services while
preserving existing React, TanStack Query, Zod, and Supabase conventions.
Exports
The entrypoint re-exports the Effect modules that Tuturuuu code should use by default:EffectDataContextLayerScheduleDurationOptionEitherCause
TuturuuuEffectErrortoTuturuuuEffectErrorserializeTuturuuuEffectErrorfromDataErrorfromPromisewithTuturuuuRetrywithTuturuuuTimeoutforEachConcurrentlyrunEffectAsResult
Expected Errors
UseTuturuuuEffectError for expected, typed failures that can cross a
server/action/API boundary in a sanitized shape.
Supabase-Style Results
UsefromDataError for APIs that return { data, error }, including Supabase
queries and RPC calls.
fromDataError preserves service-specific code, message, details, and
hint fields when present, then falls back to the provided Tuturuuu metadata.
Promise Results
UsefromPromise for async work that can throw or reject.
fromPromise receives the Effect-managed AbortSignal. Pass it into
fetch, SDK calls, or other abortable APIs so timeouts and fiber interruption
can cancel the underlying work.
Retry And Timeout
UsewithTuturuuuRetry and withTuturuuuTimeout when a server/service workflow
needs explicit resilience policy with Tuturuuu error metadata.
Controlled Concurrency
UseforEachConcurrently for bounded parallel work. It defaults to Tuturuuu’s
shared concurrency value and can be tightened per service.
Boundary Conversion
UserunEffectAsResult at route, action, or helper boundaries that already
return result objects.
context, and keep detailed diagnostics in the existing server logging path.