Skip to content
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

Typing question for the "requestHandler" function in "sentry-javascript/packages/node/src/handlers.ts" #2424

Closed
4 of 9 tasks
pgmystery opened this issue Feb 11, 2020 · 1 comment · Fixed by #2433
Closed
4 of 9 tasks

Comments

@pgmystery
Copy link

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other:

Version:

5.12.3

Description

The function "parseRequest" from "sentry-javascript/packages/node/src/handlers.ts" supports for options -> request a boolean or string array. But the "requestHandler" function in the same file, only supports boolean for options -> request. Is there a reason why the "requestHandler" doesn't include the string array in the typings ?

export function parseRequest( event: Event, req: { [key: string]: any; }, options?: { request?: boolean | string[]; },

export function requestHandler(options?: { request?: boolean; }): (req: http.IncomingMessage, res: http.ServerResponse, next: (error?: any) => void) => void {

@kamilogorek
Copy link
Contributor

@pgmystery it was a bug, fixed in #2433
Thanks!

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 a pull request may close this issue.

2 participants