Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Fitbit.Portable.Tests/Fitbit.Portable.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\Fitbit\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\Fitbit\packages\Microsoft.Bcl.1.1.10\lib\portable-net40+sl5+win8+wp8+wpa81\System.Threading.Tasks.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Threading.Tasks">
<Private>True</Private>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Fitbit.Portable.Tests/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
2 changes: 1 addition & 1 deletion Fitbit.Portable/FitbitClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ private async Task HandleResponse(HttpResponseMessage response)
}

// if we've got here then something unexpected has occured
throw new FitbitException($"An error has occured. Please see error list for details - {response.StatusCode}", errors);
throw new FitbitException($"An error has occured. Please see error list for details - {(int)response.StatusCode}", errors);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Fitbit.Portable/FitbitRequestException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class FitbitRequestException : FitbitException
public HttpResponseMessage Response { get; set; }

public FitbitRequestException(HttpResponseMessage response, IEnumerable<ApiError> errors, string message = default(string), Exception innerEx = null)
: base(message ?? $"Fitbit Request exception - Http Status Code: {response.StatusCode} - see errors for more details.", errors, innerEx)
: base(message ?? $"Fitbit Request exception - Http Status Code: {(int)response.StatusCode} - see errors for more details.", errors, innerEx)
{
this.Response = response;
}
Expand Down
2 changes: 1 addition & 1 deletion Fitbit.Portable/FitbitTokenException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Fitbit.Api.Portable
public class FitbitTokenException : FitbitRequestException
{
public FitbitTokenException(HttpResponseMessage response, IEnumerable<ApiError> errors = null, string message = default(string))
: base(response, errors, message ?? $"Fitbit Token exception - HTTP Status Code-- {response.StatusCode} -- see errors for more details.")
: base(response, errors, message ?? $"Fitbit Token exception - HTTP Status Code-- {(int)response.StatusCode} -- see errors for more details.")
{
}
}
Expand Down
2 changes: 1 addition & 1 deletion Fitbit.Portable/OAuth2/OAuth2AutoRefreshInterceptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public async Task<HttpResponseMessage> InterceptResponse(Task<HttpResponseMessag
}
else if (response.Result.RequestMessage.Headers.Contains(CUSTOM_HEADER))
{
throw new FitbitTokenException(response.Result, message: $"In interceptor {nameof(OAuth2AutoRefreshInterceptor)} inside method {nameof(InterceptResponse)} we received an unexpected stale token response - during the retry for a call whose token we just refreshed {response.Result.StatusCode}");
throw new FitbitTokenException(response.Result, message: $"In interceptor {nameof(OAuth2AutoRefreshInterceptor)} inside method {nameof(InterceptResponse)} we received an unexpected stale token response - during the retry for a call whose token we just refreshed {(int)response.Result.StatusCode}");
}
}
}
Expand Down