Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@effect/cli@0.35.29
Patch Changes
c6dd3c6
,672f137
,42b3651
,672f137
]:@effect/experimental@0.14.12
Patch Changes
c6dd3c6
,672f137
,42b3651
,672f137
]:@effect/platform@0.48.27
Patch Changes
#2479
c6dd3c6
Thanks @tim-smart! - Make the file tree provider the fallback in PlatformConfigProvider.layerFileTreeAdd#2486
672f137
Thanks @tim-smart! - accept string as a valid Socket input#2486
672f137
Thanks @tim-smart! - add Socket.runRaw to handle strings directlyUpdated dependencies [
42b3651
]:@effect/platform-browser@0.31.27
Patch Changes
c6dd3c6
,672f137
,672f137
]:@effect/platform-bun@0.32.40
Patch Changes
c6dd3c6
,672f137
,672f137
]:@effect/platform-node@0.45.29
Patch Changes
c6dd3c6
,672f137
,672f137
]:@effect/platform-node-shared@0.3.27
Patch Changes
#2486
672f137
Thanks @tim-smart! - accept string as a valid Socket input#2486
672f137
Thanks @tim-smart! - add Socket.runRaw to handle strings directlyUpdated dependencies [
c6dd3c6
,672f137
,672f137
]:@effect/rpc@0.29.3
Patch Changes
c6dd3c6
,672f137
,42b3651
,672f137
]:@effect/rpc-http@0.27.3
Patch Changes
c6dd3c6
,672f137
,42b3651
,672f137
]:@effect/schema@0.64.20
Patch Changes
#2483
42b3651
Thanks @gcanti! - AddParseIssueTitle
annotation, closes From Discord: Enhancing Debugging with Custom Error Messages in Schema Validation #2482When a decoding or encoding operation fails, it's useful to have additional details in the default error message returned by
TreeFormatter
to understand exactly which value caused the operation to fail. To achieve this, you can set an annotation that depends on the value undergoing the operation and can return an excerpt of it, making it easier to identify the problematic value. A common scenario is when the entity being validated has anid
field. TheParseIssueTitle
annotation facilitates this kind of analysis during error handling.The type of the annotation is:
If you set this annotation on a schema and the provided function returns a
string
, then that string is used as the title byTreeFormatter
, unless amessage
annotation (which has the highest priority) has also been set. If the function returnsundefined
, then the default title used byTreeFormatter
is determined with the following priorities:identifier
title
description
ast.toString()
Example
In the examples above, we can see how the
parseIssueTitle
annotation helps provide meaningful error messages when decoding fails.