Skip to content

Commit 8f496ca

Browse files
committed
docs: update README
1 parent 98557f9 commit 8f496ca

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

packages/plugin-http-errors/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@ import createHttpErrorPlugin from '@bugsnag/plugin-http-errors'
1919
const plugin = createHttpErrorPlugin({
2020
httpErrorCodes: [401, { min: 404, max: 499 }], // handle individual error codes or ranges of error codes
2121
maxRequestSize: 5_000, // don't capture requests over 5kb
22-
maxResponseSize: 20_000, // don't capture responses over 20kb
2322
onHttpError: ({ request, response }) => {
2423
// Only handle 5xx errors
25-
if (response.status < 500 || response.status > 599) return false
24+
if (response.statusCode < 500 || response.statusCode > 599) return false
2625

2726
// Exclude specific domains
2827
if (request.url.indexOf('redacted.domain.com') === 0) return false
2928

3029
// Update properties on the reported request and response
3130
request.url = '[REDACTED]'
32-
response.status = 418
31+
response.statusCode = 418
3332

3433
return true // return value will determine whether the error is reported
3534
}

0 commit comments

Comments
 (0)