Skip to content

Commit

Permalink
Merge pull request #64 from FromDoppler/no-ticket-add-more-detail-to-…
Browse files Browse the repository at this point in the history
…authentication-log

[No ticket] Add response message to authentication log
  • Loading branch information
fgchaio authored Jan 25, 2024
2 parents f466e19 + 83581d5 commit 65a86b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doppler-beplic/Services/Classes/BeplicSdk.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Globalization;
using System.Net;
using System.Security.Authentication;
using DopplerBeplic.Models.Config;
Expand Down Expand Up @@ -75,7 +76,7 @@ private async Task Authenticate()
access_token = string.Empty,
expires_in = 0
})
: throw new AuthenticationException(message: "Failed to authenticate to beplic API.");
: throw new AuthenticationException(message: string.Format(CultureInfo.InvariantCulture, "Failed to authenticate to beplic API. Error: {0}. RequestedURL: {1}", response.Content, response.ResponseUri?.AbsoluteUri ?? ""));
#pragma warning restore CS8600 // Converting null literal or possible null value to non-nullable type.

#pragma warning disable CS8602 // Dereference of a possibly null reference.
Expand Down

0 comments on commit 65a86b3

Please sign in to comment.