Skip to content
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

Add onTaskError option to report errors to node consumers #808

Merged
merged 6 commits into from
Sep 5, 2023

Conversation

weeksling
Copy link
Contributor

@weeksling weeksling commented Aug 30, 2023

Adds an option that receives an error when options or task fails. Consumes the same fatalError message that would be logged to CLI for a user error.

@weeksling
Copy link
Contributor Author

@tmeasday I mentioned this the other day. Right now I just thought to push the formatted error we normally send to the CLI output to the user.
This captures runtime errors I can emit to the client, but the output is pretty long for storybook notification.

I'm curious what you think about adding another formatter to make it shorter or passing along the raw error or other info along with the formatted error.

@weeksling weeksling changed the title dd on task error option Add onTaskError option to report errors to node consumers Aug 30, 2023
@weeksling weeksling changed the base branch from main to tom/ap-3561-cli-add-new-ontaskprogress-event-triggered-by-upload-and August 30, 2023 20:14
…by-upload-and' into matt/add-on-task-error-option
Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I agree, let's pass the raw error(s) as well as the formatted version.

Base automatically changed from tom/ap-3561-cli-add-new-ontaskprogress-event-triggered-by-upload-and to main August 31, 2023 03:01
node-src/main.test.ts Outdated Show resolved Hide resolved
@weeksling weeksling merged commit a5e8204 into main Sep 5, 2023
20 checks passed
@weeksling weeksling deleted the matt/add-on-task-error-option branch September 5, 2023 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants