Skip to content

Commit b7e3b6c

Browse files
committed
Working on OAuth
1 parent 213df33 commit b7e3b6c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

NotionForCmdPalOAuthAPI/Authentication/OAuthClient.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,17 @@ public static async Task<IActionResult> HandleOAuthRedirection(Uri response)
9292
catch (HttpRequestException ex)
9393
{
9494
Debug.WriteLine($"Request failed: {ex.Message}");
95+
return new ContentResult() { StatusCode = 500, ContentType = "text/plain", Content = $"Request failed: There was a problem authenticating with Notion. Please try again later. \n\n{x}\n\n{ex.Message}" };
9596
}
9697
catch (JsonException ex)
9798
{
9899
Debug.WriteLine($"JSON parsing failed: {ex.Message}");
99-
return new ContentResult() { StatusCode = 500, ContentType = "text/plain", Content = $"There was a problem authenticating with Notion. Please try again later. \n\n{x}\n\n{ex.Message}" };
100+
return new ContentResult() { StatusCode = 500, ContentType = "text/plain", Content = $"JSON parsing failed: There was a problem authenticating with Notion. Please try again later. \n\n{x}\n\n{ex.Message}" };
100101
}
101102
catch (Exception ex)
102103
{
103104
Debug.WriteLine($"Unexpected error: {ex.Message}");
105+
return new ContentResult() { StatusCode = 500, ContentType = "text/plain", Content = $"Unexpected error: There was a problem authenticating with Notion. Please try again later. \n\n{x}\n\n{ex.Message}" };
104106
}
105107

106108
return new ContentResult() { StatusCode = 500, ContentType = "text/plain", Content = $"There was a problem authenticating with Notion. Please try again later." };

0 commit comments

Comments
 (0)