-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(faucet,store-indexer): fix invalid env message #1546
Conversation
🦋 Changeset detectedLatest commit: 713577a The changes in this PR will be included in the next version bump. This PR includes changesets to release 29 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
RPC_WS_URL: z.string(), | ||
}) | ||
.partial() | ||
.refine((values) => Object.values(values).some(isDefined)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refine wasn't surfacing nice error messages, would need superRefine for that and didn't feel like wiring that up, so I switched this to a union
} | ||
throw error; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could prob move this into a common util in the future
My refactor of env parsing with Zod in #1533 was incomplete and didn't realize the intersection errors got buried.
This replaces the env handling with a nicer error message format like: