Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to show [Discord]-provided error message #1145

Merged
merged 2 commits into from
Oct 10, 2017

Conversation

abalabahaha
Copy link
Contributor

Implements #981.

The Discord API occasionally returns Cloudflare HTML errors or invalid JSON, so in those cases it will fallback to the standard 'inaccessible' message. Some of the returned errors have uppercase letters, so toLowerCase() is used to stay consistent with the rest of shields.

@paulmelnikow
Copy link
Member

Hi! Thanks for this. Could you add a test that covers the new code? You could use the example response provided in #981.

@paulmelnikow paulmelnikow added the service-badge New or updated service badge label Oct 10, 2017
@abalabahaha
Copy link
Contributor Author

Added a test based on the sample response in #981

@paulmelnikow paulmelnikow changed the title Attempt to show Discord-provided error message Attempt to show [Discord]-provided error message Oct 10, 2017
@paulmelnikow
Copy link
Member

Thanks!

@paulmelnikow paulmelnikow merged commit af0f338 into badges:master Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants