inngest / inngest-js

The developer platform for easily building reliable workflows with zero infrastructure for TypeScript & JavaScript
https://www.inngest.com/
GNU General Public License v3.0
414 stars 41 forks source link

Fix event API errors not being parsed and returned #535

Closed jpwilliams closed 5 months ago

jpwilliams commented 5 months ago

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

changeset-bot[bot] commented 5 months ago

🦋 Changeset detected

Latest commit: c85b9c989f76a8d2e1853158e0298f645079aae4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------- | ----- | | inngest | Patch |

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