Effect CommunityEC
Effect Community3y ago
9 replies
Stephen Bluck

Creating a Custom Parse Error Message with `@effect/schema/ParseResult`

How do I create a custom parse error message with @effect/schema/ParseResult?
private _parseRegistered = (val: string) =>
  Effect.tryPromise({
    try: () => this.parseRegistered(val),
    catch: (e) => PR.parseError([PR.unexpected(e)])
  });

I thought this might work but PR.unexpected doesn't ever seem to print out anything you give to it.
Was this page helpful?