Adding abort & publish events methods for jobs #156
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi
I'm adding 2 methods in this PR.
When using the node client for custom integrations, it's useful to abort the job in case of failure and see that in the J1 UI.
Same goes for Publish Events where it is nice that we can see our own useful logs for our custom integrations in case they fail for example.
Adding 2 small fixes as well.
if (err instanceof FetchError)
and handle the error more gracefully. Root reason is that the error message is so long that when it gets sent to Sentry, a big part of it is truncated and there is no other way to see the other attributes. Adding these attributes allows TypeScript to access them without having to do@ts-ignore
.eslint-config-prettier
to devDependencies. No reason to have that in production dependencies