-
Notifications
You must be signed in to change notification settings - Fork 100
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
feat: application error support #286
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
*/ | ||
constructor(message: string, status: number) { | ||
if (message.length > 90) throw new Error("Message too long"); | ||
if (status < 400 || status >= 500) throw new Error("Invalid status code"); |
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 don't allow 500?
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.
not allowed by the spec
https://warpcast.notion.site/Frames-Errors-ddc965b097d44d9ea03ddf98498597c6
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.
ah ok, still weird decision but I understand that this is for UI feedback as well.
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.
It is little confusing because people could use it to return 500. Is that a way to disallow 500 at least on type level?
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.
can do
Change Summary
Adds support for application errors
Merge Checklist