mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
fix for missing header in the Nexu API response
This commit is contained in:
parent
78b21550a8
commit
8ede69a14b
@ -135,8 +135,17 @@ namespace Wabbajack.NexusApi
|
||||
|
||||
private void UpdateRemaining(HttpResponseMessage response)
|
||||
{
|
||||
int dailyRemaining = int.Parse(response.Headers.GetValues("x-rl-daily-remaining").First());
|
||||
int hourlyRemaining = int.Parse(response.Headers.GetValues("x-rl-hourly-remaining").First());
|
||||
int dailyRemaining, hourlyRemaining;
|
||||
try
|
||||
{
|
||||
dailyRemaining = int.Parse(response.Headers.GetValues("x-rl-daily-remaining").First());
|
||||
hourlyRemaining = int.Parse(response.Headers.GetValues("x-rl-hourly-remaining").First());
|
||||
}
|
||||
catch (InvalidDataException ex)
|
||||
{
|
||||
Utils.Log("Couldn't find x-rl-*-remaining headers in Nexus response. Ignoring");
|
||||
return;
|
||||
}
|
||||
|
||||
lock (RemainingLock)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user