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

v1.22.2 has breaking change with the strictness of "onOperation" for what is a valid answer #133

Closed
jeremiewtd opened this issue Nov 18, 2024 · 2 comments
Labels
bug Something isn't working released Has been released and published

Comments

@jeremiewtd
Copy link

Using v1.22.1, returning this value from the onOperation handler works well but now doesn't work anymore using the v1.22.2 :

return [
  JSON.stringify(result),
  {
    status: 200,
    headers: {
      'content-type': 'application/json; charset=utf-8',
    },
  },
];

Looking at the code in this PR, this should be the source of the changes, the validation of type of statusText introduces a breaking change of the interpretation of what is returned by onOperation.

The example above doesn't work anymore, maybe this code is not suitable from the beginning but with v1.22.1 it worked.

Expected Behaviour
The given response still works or else the library should have change its major version.

Actual Behaviour
The given response is not interpreted as a valid response anymore.

Further Information
A bit surprising that this change (and others) are not included in the changelog for this release.

@enisdenjo enisdenjo added the bug Something isn't working label Nov 19, 2024
@enisdenjo
Copy link
Member

Thanks for pointing this out, this was an oversight on my end. Both status and statusText are actually optional (see here).

I'll roll out a fix soon!

enisdenjo pushed a commit that referenced this issue Nov 20, 2024
## [1.22.3](v1.22.2...v1.22.3) (2024-11-20)

### Bug Fixes

* **handler:** Response options `status` and `statusText` are optional ([38a0191](38a0191)), closes [#133](#133)
@enisdenjo
Copy link
Member

🎉 This issue has been resolved in version 1.22.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@enisdenjo enisdenjo added the released Has been released and published label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Has been released and published
Projects
None yet
Development

No branches or pull requests

2 participants