Custom invariant implementation #288
kentcdodds
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
tiny-invariant
doesn't include your message in the error it throws in production. I don't agree with this decision. The PR to remove this behavior has been ignored alexreardon/tiny-invariant#172. It's a really simple library so I've implemented it directly in the Epic Stack.I've also added an
invariantResponse
which throws a response with a400
status code. This is appropriate for a lot of use cases we had for invariant so this improves those situations.Beta Was this translation helpful? Give feedback.
All reactions