Skip to content

fix: ensure resolveResponse always resolves promises.#331

Merged
radist2s merged 2 commits into
mainfrom
fix/resolve-response-fn
May 23, 2025
Merged

fix: ensure resolveResponse always resolves promises.#331
radist2s merged 2 commits into
mainfrom
fix/resolve-response-fn

Conversation

@radist2s

Copy link
Copy Markdown
Collaborator

This change modifies the resolveResponse function to always return a resolved Promise
rather than rejecting when no responsePromise is provided. This brings the function's
behavior in line with the requestFn pattern, ensuring consistent error handling.

@changeset-bot

changeset-bot Bot commented May 23, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c796132

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

This PR includes changesets to release 6 packages
Name Type
@openapi-qraft/react Patch
@openapi-qraft/cli Patch
@openapi-qraft/plugin Patch
@openapi-qraft/tanstack-query-react-plugin Patch
@openapi-qraft/tanstack-query-react-types Patch
@openapi-qraft/openapi-typescript-plugin 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

const mockResponse = new Response(null);

// We use casting to bypass type checking, since we know that the function accepts Response
// without promis in the implementation, although types do not allow it directly

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[promis](#security-tab) is not a recognized word. \(unrecognized-spelling\)
@radist2s radist2s changed the title fix: ensure resolveResponse always **resolves** promises. fix: ensure resolveResponse always *resolves* promises. May 23, 2025
@radist2s radist2s changed the title fix: ensure resolveResponse always *resolves* promises. fix: ensure resolveResponse always resolves promises. May 23, 2025
@github-actions

This comment has been minimized.

@radist2s radist2s marked this pull request as ready for review May 23, 2025 18:17
@radist2s radist2s enabled auto-merge May 23, 2025 18:21
auto-merge was automatically disabled May 23, 2025 18:25

Pull Request is not mergeable

@radist2s radist2s force-pushed the fix/resolve-response-fn branch from b763062 to c796132 Compare May 23, 2025 18:30
@radist2s radist2s enabled auto-merge May 23, 2025 18:30
@radist2s radist2s merged commit b509b14 into main May 23, 2025
13 checks passed
@radist2s radist2s deleted the fix/resolve-response-fn branch May 23, 2025 18:33
@radist2s radist2s force-pushed the fix/resolve-response-fn branch from 9a1e91c to b763062 Compare May 23, 2025 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants