-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix: Updating dependencies and fixes #144
Changes from all commits
ca4f9ae
a298e66
5575feb
34c3ac4
c169b6d
1e6d79d
fd22573
70be34d
ce1f77a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
yarn.lock | ||
|
||
build/ | ||
.tap/ | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,7 +133,7 @@ class Raygun { | |
return this; | ||
} | ||
|
||
user(req?: Request): RawUserData | null { | ||
user(req?: RequestParams): RawUserData | null { | ||
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. The original code mixed the 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. Yeah, that's a good change. I've seen these type overlays before with NestJS using Express internally, similar problem. |
||
return null; | ||
} | ||
|
||
|
@@ -189,7 +189,7 @@ class Raygun { | |
exception: Error | string, | ||
customData?: CustomData, | ||
callback?: (err: Error | null) => void, | ||
request?: Request, | ||
request?: RequestParams, | ||
tags?: Tag[] | ||
): Message { | ||
const sendOptionsResult = this.buildSendOptions( | ||
|
@@ -251,7 +251,7 @@ class Raygun { | |
exception: Error | string, | ||
customData?: CustomData, | ||
callback?: (err: Error | null) => void, | ||
request?: Request, | ||
request?: RequestParams, | ||
tags?: Tag[] | ||
): void { | ||
const result = this.buildSendOptions( | ||
|
@@ -276,7 +276,18 @@ class Raygun { | |
customData = this.expressCustomData; | ||
} | ||
|
||
this.send(err, customData || {}, function () {}, req, [ | ||
// Convert the Express Request to an object that can be sent to Raygun | ||
const requestParams: RequestParams = { | ||
hostname: req.hostname, | ||
path: req.path, | ||
method: req.method, | ||
ip: req.ip ?? '', | ||
query: req.query, | ||
headers: req.headers, | ||
body: req.body, | ||
}; | ||
|
||
this.send(err, customData || {}, function () {}, requestParams, [ | ||
"UnhandledException", | ||
]); | ||
next(err); | ||
|
@@ -293,7 +304,7 @@ class Raygun { | |
exception: Error | string, | ||
customData?: CustomData, | ||
callback?: Callback<IncomingMessage>, | ||
request?: Request, | ||
request?: RequestParams, | ||
tags?: Tag[] | ||
): SendOptionsResult { | ||
let mergedTags: Tag[] = []; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
temporal test result files, ignored so they don't get commited