GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — interceptors: move throwOnError to interceptor by mertcanaltin · Pull Request #3331 · nodejs/undici Conversation
Member
Test Issue:
Need assistance to resolve test failures.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
KhafraDev
suggested changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove http-errors
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
mertcanaltin
commented
Uh oh!
There was an error while loading. Please reload this page.
ronag
reviewed
Uh oh!
There was an error while loading. Please reload this page. Co-authored-by: Robert Nagy <[email protected]>
ronag
reviewed
Uh oh!
There was an error while loading. Please reload this page.
ronag
reviewed
Uh oh!
There was an error while loading. Please reload this page. Co-authored-by: Robert Nagy <[email protected]>
ronag
reviewed
Uh oh!
There was an error while loading. Please reload this page. Co-authored-by: Robert Nagy <[email protected]>
metcoder95
reviewed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please do not forget to add docs and TS types 👍
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
ronag
reviewed
Uh oh!
There was an error while loading. Please reload this page.
ronag
reviewed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we also apply it to one of the API decoreators? e.g. diff --git a/lib/api/api-request.js b/lib/api/api-request.js index ced5590d..f91b830a 100644 --- a/lib/api/api-request.js +++ b/lib/api/api-request.js @@ -13,7 +13,7 @@ class RequestHandler extends AsyncResource { throw new InvalidArgumentError('invalid opts') } - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts + const { signal, method, opaque, body, onInfo, responseHeaders, highWaterMark } = opts try { if (typeof callback !== 'function') { @@ -54,7 +54,6 @@ class RequestHandler extends AsyncResource { this.trailers = {} this.context = null this.onInfo = onInfo || null - this.throwOnError = throwOnError this.highWaterMark = highWaterMark this.signal = signal this.reason = null @@ -132,20 +131,14 @@ class RequestHandler extends AsyncResource { this.callback = null this.res = res if (callback !== null) { - if (this.throwOnError && statusCode >= 400) { - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body: res, - context - }) - } + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body: res, + context + }) } } @@ -200,7 +193,7 @@ function request (opts, callback) { } try { - this.dispatch(opts, new RequestHandler(opts, callback)) + this.compose(responseErrorInterceptor()).dispatch(opts, new RequestHandler(opts, callback)) } catch (err) { if (typeof callback !== 'function') { throw err
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
ronag
reviewed
Uh oh!
There was an error while loading. Please reload this page. Co-authored-by: Robert Nagy <[email protected]>
ronag
reviewed
Uh oh!
There was an error while loading. Please reload this page.
ronag
reviewed
Uh oh!
There was an error while loading. Please reload this page.
ronag
reviewed
Uh oh!
There was an error while loading. Please reload this page.
metcoder95
reviewed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tests seems to be failing
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
metcoder95
reviewed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's add the respective TS types and docs 👍
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
metcoder95
reviewed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! It LGTM, just smaller comments on the docs 👍
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
ronag
approved these changes
KhafraDev
suggested changes
Uh oh!
There was an error while loading. Please reload this page. Co-authored-by: Khafra <[email protected]>
KhafraDev
approved these changes
github-actions Bot
pushed a commit
that referenced
this pull request
(cherry picked from commit 0ea1074)
Merged
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers+1 more reviewerUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabelsProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. | |||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |