Skip to content

Conversation

@airportyh
Copy link
Contributor

@airportyh airportyh commented Mar 14, 2025

Why

Have the generated code return error types that actually satisfy the ErrorType. Previously the union type for error types generated can be values of RiverUnknownValue which is not an error type. This introduces a RiverUnknownError and uses that in the error unions instead. Also type adapter types are now more strictly typed.

Testing

When switching the client code over, we should get errors about RiverUnknownError not being handled and force you to fix them.

@airportyh airportyh changed the base branch from main to th-cache-type-adapters March 14, 2025 20:56
@airportyh airportyh marked this pull request as ready for review March 14, 2025 21:03
@airportyh airportyh requested a review from a team as a code owner March 14, 2025 21:03
@airportyh airportyh requested review from blast-hardcheese and jackyzha0 and removed request for a team March 14, 2025 21:03
Base automatically changed from th-cache-type-adapters to main March 14, 2025 21:20
Co-authored-by: Devon Stewart <devon.stewart@repl.it>
@blast-hardcheese blast-hardcheese merged commit 38554fc into main Mar 22, 2025
3 checks passed
@blast-hardcheese blast-hardcheese deleted the th-stricter-error-types branch March 22, 2025 06:01
@blast-hardcheese blast-hardcheese added the enhancement New feature or request label Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants