DoSomething / gladiator

:guardsman: The DoSomething.org competitions platform.
2 stars 0 forks source link

Return more specific error messages #422

Closed sbsmith86 closed 7 years ago

sbsmith86 commented 7 years ago

What's this PR do?

Updates the unsubscribe API response so that it sends better response codes/messages if a user is already subscribed.

How should this be manually tested?

Try to unsubscribe from a competition that you are already unsubscribe from, and you should receive a 422 error.

Any background context you want to provide?

On the northstar side, when users unsubscribe and they are already unsubscribed from a competition, they receive an error message that says "There was an error processing your request." That led us to think there was something wrong with the functionality, but it seems to be working fine, except that we don't make it clear to the user that they are already unsubscribed.

Additionally we need to figure out why people are trying to unsubscribe from something they are already unsubscribed from. Going to dig into if we are still sending messages to unsubscribed people.

What are the relevant tickets?

Fixes 🐛