-
Notifications
You must be signed in to change notification settings - Fork 44
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
Fix event API errors not being parsed and returned #535
Conversation
🦋 Changeset detectedLatest commit: c85b9c9 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 |
error, | ||
} | ||
: { | ||
status, |
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.
Maybe our of scope for this PR, but do we test partial Event API failures? Like if you send 2 events where the 1st is valid and the 2nd is invalid
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## inngest@3.16.2 ### Patch Changes - [#538](#538) [`d9d57c4`](d9d57c4) Thanks [@jpwilliams](https://github.com/jpwilliams)! - Fix `{ name: string; }` objects being filtered out of `step.run()` responses when nullable or a union - [#536](#536) [`73e04a5`](73e04a5) Thanks [@jpwilliams](https://github.com/jpwilliams)! - Do not swallow JSON parsing errors when syncing - [#535](#535) [`09ef143`](09ef143) Thanks [@jpwilliams](https://github.com/jpwilliams)! - Fix sending events sometimes returning generic errors when we can be more specific Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Summary
When the event API responds with an error, we attempt to parse that error and include it in the
Error
returned to the user.The tests for this, however, mocked the incorrect response from Inngest, resulting in the illusion of this functioning. The mock has been changed and the fix implemented by slightly changing the parsing of the response.
Checklist
Added a docs PR that references this PRN/A Bug fix