If discord error code is 0, fall back to http code

This commit is contained in:
RogueException
2017-03-18 09:32:04 -03:00
parent fbd34d6719
commit 96a377a258

View File

@@ -20,7 +20,7 @@ namespace Discord.Net
private static string CreateMessage(HttpStatusCode httpCode, int? discordCode = null, string reason = null)
{
string msg;
if (discordCode != null)
if (discordCode != null && discordCode != 0)
{
if (reason != null)
msg = $"The server responded with error {(int)discordCode}: {reason}";