Skip to content

Conversation

@metcoder95
Copy link
Member

@metcoder95 metcoder95 commented Apr 14, 2024

This relates to...

Rationale

Relates to #2835

Changes

  • feat: add dump interceptor
  • fix(types): interceptor definitions

Features

Bug Fixes

Breaking Changes and Deprecations

Status

@metcoder95 metcoder95 requested a review from ronag April 14, 2024 13:53
return true
}

// TODO: shall we forward the rest of the data to the handler or better to abort?
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggestions? I might be had it wrong here 🤔

Copy link
Member

Choose a reason for hiding this comment

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

you must keep the data flowing from the request or error/abort it. The latter will destroy the connection. It should be a user choice, but I would error/abort the socket by default.

Copy link
Member

@ronag ronag left a comment

Choose a reason for hiding this comment

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

Should the dump interceptor should also dump on abort?

@metcoder95
Copy link
Member Author

Should the dump interceptor should also dump on abort?

Do you mean to not directly abort the connection, but rather let it flow? Or how so?

@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2024

Codecov Report

Attention: Patch coverage is 90.29851% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 94.15%. Comparing base (8c3d42a) to head (4492ab7).

Files Patch % Lines
lib/interceptor/dump.js 90.15% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3118      +/-   ##
==========================================
- Coverage   94.17%   94.15%   -0.03%     
==========================================
  Files          90       91       +1     
  Lines       24559    24692     +133     
==========================================
+ Hits        23128    23248     +120     
- Misses       1431     1444      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

return true
}

// TODO: shall we forward the rest of the data to the handler or better to abort?
Copy link
Member

Choose a reason for hiding this comment

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

you must keep the data flowing from the request or error/abort it. The latter will destroy the connection. It should be a user choice, but I would error/abort the socket by default.

@metcoder95 metcoder95 requested a review from ronag April 17, 2024 10:37
@metcoder95 metcoder95 mentioned this pull request Apr 19, 2024
13 tasks
@mcollina
Copy link
Member

@ronag ptal

Copy link
Member

@ronag ronag left a comment

Choose a reason for hiding this comment

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

I have more opinions. Will try to have a better look as soon as I can.

Co-authored-by: Robert Nagy <[email protected]>
Copy link
Member

@ronag ronag left a comment

Choose a reason for hiding this comment

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

I would remove waitForTrailers. Just makes things complicated for an edge case.

@Uzlopak Uzlopak deleted the feat/dump_interceptor branch June 16, 2024 20:16
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.

interceptors does not have any exported type

6 participants