Skip to content

Commit

Permalink
Report on oauth failures
Browse files Browse the repository at this point in the history
  • Loading branch information
remvee committed May 16, 2024
1 parent d2dc233 commit 8e95780
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions policies/aggregation/aggregation.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ module.exports = (config, { gatewayConfig: { serviceEndpoints } }) => {
} catch (err) {
if (err instanceof oauthClient.AuthorizationError) {
logger.warn(err)
report({
statusCode: err.statusCode,
reqTimerEnd: new Date(),
short_message: `oauth failure: ${err.message}`
})
endpointDone(endpoint, { statusCode: err.statusCode })
} else {
throw err
Expand Down

0 comments on commit 8e95780

Please sign in to comment.