const IdempotencyKey = Schema.UUID.pipe(Schema.brand("IdempotencyKey"), Schema.Option)
type IdempotencyKey = typeof IdempotencyKey.Type
const program = Effect.gen(function*() {
const decodeIdempotencyKey = Schema.decode(IdempotencyKey)
const rik = yield* decodeIdempotencyKey(Option.some("bb7d0d23-0725-4d68-b331-9061eca05b71")).pipe(
Effect.catchTag("ParseError", (e) => Effect.log(e.message).pipe(Effect.andThen(() => Option.none())))
// Effect.catchTag("ParseError", (e) => Option.none().pipe(Effect.tap(() => Effect.log(e.message))))
)
yield* Effect.log(rik)
})
const IdempotencyKey = Schema.UUID.pipe(Schema.brand("IdempotencyKey"), Schema.Option)
type IdempotencyKey = typeof IdempotencyKey.Type
const program = Effect.gen(function*() {
const decodeIdempotencyKey = Schema.decode(IdempotencyKey)
const rik = yield* decodeIdempotencyKey(Option.some("bb7d0d23-0725-4d68-b331-9061eca05b71")).pipe(
Effect.catchTag("ParseError", (e) => Effect.log(e.message).pipe(Effect.andThen(() => Option.none())))
// Effect.catchTag("ParseError", (e) => Option.none().pipe(Effect.tap(() => Effect.log(e.message))))
)
yield* Effect.log(rik)
})