Skip to content

Commit

Permalink
Catch any errors in creating the AtProtoOAuthClient
Browse files Browse the repository at this point in the history
  • Loading branch information
golf1052 committed Nov 29, 2024
1 parent 7a72ce3 commit fe2a962
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions SeattleCarsInBikeLanes/Controllers/UploadController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,13 @@ await slackbotProvider.SendSlackMessage($"New submission. {metadata.NumberOfCars
!string.IsNullOrWhiteSpace(metadata.BlueskyUserBaseUrl) &&
!string.IsNullOrWhiteSpace(metadata.BlueskyUserAccessToken))
{
AtProtoOAuthClient blueskyClient = new AtProtoOAuthClient(metadata.BlueskyUserDid,
metadata.BlueskyUserKeyId,
metadata.BlueskyUserPrivateKey,
metadata.BlueskyUserBaseUrl,
metadata.BlueskyUserAccessToken);
try
{
AtProtoOAuthClient blueskyClient = new AtProtoOAuthClient(metadata.BlueskyUserDid,
metadata.BlueskyUserKeyId,
metadata.BlueskyUserPrivateKey,
metadata.BlueskyUserBaseUrl,
metadata.BlueskyUserAccessToken);
var profile = await blueskyClient.GetProfile();
return profile.Handle == metadata.BlueskyHandle &&
profile.Did == metadata.BlueskyUserDid;
Expand Down

0 comments on commit fe2a962

Please sign in to comment.