Fix multiplayer score submission failing silently (#5034)

Fix multiplayer score submission failing silently
This commit is contained in:
Dean Herbert 2019-06-16 00:41:54 +09:00 committed by GitHub
commit c4899d90ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -262,8 +262,9 @@ private bool handleRequest(APIRequest req)
handleWebException(we); handleWebException(we);
return false; return false;
} }
catch catch (Exception ex)
{ {
Logger.Error(ex, "Error occurred while handling an API request.");
return false; return false;
} }
} }

View File

@ -30,7 +30,10 @@ protected override WebRequest CreateWebRequest()
req.ContentType = "application/json"; req.ContentType = "application/json";
req.Method = HttpMethod.Put; req.Method = HttpMethod.Put;
req.AddRaw(JsonConvert.SerializeObject(scoreInfo)); req.AddRaw(JsonConvert.SerializeObject(scoreInfo, new JsonSerializerSettings
{
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
}));
return req; return req;
} }