Skip to content
Snippets Groups Projects
Unverified Commit fdeda3e3 authored by chris48s's avatar chris48s Committed by GitHub
Browse files

Revert "log an error to sentry if an upstream service responds with `429 Too...

Revert "log an error to sentry if an upstream service responds with `429 Too Many Requests` (#9505)" (#9523)

This reverts commit 53537822.
parent 1ee176e0
No related branches found
No related tags found
No related merge requests found
import log from '../server/log.js'
import { NotFound, InvalidResponse, Inaccessible } from './errors.js' import { NotFound, InvalidResponse, Inaccessible } from './errors.js'
const defaultErrorMessages = { const defaultErrorMessages = {
...@@ -26,13 +25,6 @@ export default function checkErrorResponse(httpErrors = {}) { ...@@ -26,13 +25,6 @@ export default function checkErrorResponse(httpErrors = {}) {
error = new InvalidResponse(props) error = new InvalidResponse(props)
} }
} }
if (res.statusCode === 429) {
log.error(
new Error(`429 Too Many Requests calling ${res.requestUrl.origin}`),
)
}
if (error) { if (error) {
error.response = res error.response = res
error.buffer = buffer error.buffer = buffer
......
...@@ -47,7 +47,7 @@ describe('async error handler', function () { ...@@ -47,7 +47,7 @@ describe('async error handler', function () {
context('when status is 429', function () { context('when status is 429', function () {
const buffer = Buffer.from('some stuff') const buffer = Buffer.from('some stuff')
const res = { statusCode: 429, requestUrl: new URL('https://example.com/') } const res = { statusCode: 429 }
it('throws InvalidResponse', async function () { it('throws InvalidResponse', async function () {
try { try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment