-
Notifications
You must be signed in to change notification settings - Fork 1.3k
custom error classes #601
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
custom error classes #601
Conversation
🦋 Changeset detectedLatest commit: 58b7e08 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
| this.name = this.constructor.name; | ||
| } | ||
| } | ||
|
|
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.
let's make a StagehandDefaultError that extends StagehandError with the message "Hey! We're sorry you ran into an error. If you need help, please open a Github issue or send us a Slack message (link to both)"
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.
^ this should go into init, act/extract/observe global
sameelarif
left a comment
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.
there are still a lot of instances of Stagehand throwing a default Error. if you do a global search for throw new Error you'll see a bunch in lib/llm and more elsewhere
kamath
left a comment
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.
need to add errors to api and check for those errors and throw the same errors client-side
* custom error classes * throw error when act, extract, observe are called instead of immediately * revert removal (should be done in separate PR) * rm dumb comments * changeset * more errors * global default error on init, act, extract, observe * minor * more errors
why
what changed