fix(feedback)!: always reject sendFeedback with an Error#20475
Draft
logaretm wants to merge 1 commit intoawad/js-126-allow-error-messages-to-be-customizedfrom
Draft
fix(feedback)!: always reject sendFeedback with an Error#20475logaretm wants to merge 1 commit intoawad/js-126-allow-error-messages-to-be-customizedfrom
logaretm wants to merge 1 commit intoawad/js-126-allow-error-messages-to-be-customizedfrom
Conversation
29f92e6 to
90ef1af
Compare
Contributor
size-limit report 📦
|
c6d759f to
44d8d3c
Compare
Previously, sendFeedback's async rejection paths (timeout, 403, generic transport error) rejected with plain strings, while the sync-throw paths used Error instances. Unify on Error for all paths so consumers can rely on a consistent rejection shape. BREAKING CHANGE: sendFeedback now always rejects with an Error whose .message is the error code (ERROR_TIMEOUT, ERROR_FORBIDDEN, or ERROR_GENERIC). Previously these paths rejected with the raw string. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
44d8d3c to
fdc6ca4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sendFeedbackcurrently rejects with anErrorin some paths and a raw string in others. This normalizes all paths to reject with anError, which is the expected shape and easier to handle for consumers.Breaking: intended for the next major.