Skip to content

fix: broken api return values and types #1550

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

Merged
merged 1 commit into from
May 28, 2025

Conversation

isekovanic
Copy link
Contributor

CLA

  • I have signed the Stream CLA (required).
  • Code changes are tested

Description of the changes, What, Why and How?

Unfortunately, with the latest offline support rework the types of all queueable actions were broken to be T | undefined instead of T.

This PR addresses that, by forcing queueTask to throw if execution fails just like any of our HTTP apis would.

Changelog

Copy link
Contributor

Size Change: +861 B (+0.21%)

Total Size: 409 kB

Filename Size Change
dist/cjs/index.browser.cjs 117 kB +284 B (+0.24%)
dist/cjs/index.node.cjs 161 kB +293 B (+0.18%)
dist/esm/index.js 130 kB +284 B (+0.22%)

compressed-size-action


// Vitest helper (serialized errors are too large to read)
// https://github.com/vitest-dev/vitest/blob/v3.1.3/packages/utils/src/error.ts#L60-L62
toJSON() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was copied over from Anton's serialization of API errors for the purposes of getting it out quickly so that the LLC doesn't have broken types.

We can enrich and revisit these offline specific errors later on and use them as needed.

@isekovanic isekovanic merged commit 07a204c into master May 28, 2025
4 checks passed
@isekovanic isekovanic deleted the fix/broken-ts-types-for-offline branch May 28, 2025 12:07
github-actions bot pushed a commit that referenced this pull request May 28, 2025
## [9.3.0](v9.2.0...v9.3.0) (2025-05-28)

### Bug Fixes

* broken api return values and types ([#1550](#1550)) ([07a204c](07a204c))
* override target scalar, null and undefined values with mergeWith ([#1549](#1549)) ([ad3a328](ad3a328))

### Features

* [CHA-858] Add event hooks to app settings ([#1537](#1537)) ([4612572](4612572))
@stream-ci-bot
Copy link

🎉 This PR is included in version 9.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants