Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

fix(bounces): ensure db errors don't get converted to 429 responses #59

Merged
merged 1 commit into from Jun 8, 2018

Conversation

philbooth
Copy link
Contributor

Fixes #56.

We were indiscriminately converting all bounce errors to a 429 response. This changes it so we only return the 429 if the error has a bounce record, otherwise we return a 500.

@mozilla/fxa-devs r?

@philbooth philbooth self-assigned this Jun 6, 2018
@philbooth philbooth requested a review from a team June 6, 2018 10:11
Failure(
error
.bounce
.map_or(Status::InternalServerError, |_| Status::TooManyRequests),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@vladikoff vladikoff merged commit 5986e84 into master Jun 8, 2018
@vladikoff vladikoff deleted the pb/56 branch June 8, 2018 04:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants