Skip to content

Commit

Permalink
[443] fix timeout handling
Browse files Browse the repository at this point in the history
  • Loading branch information
philosowaffle committed Nov 11, 2023
1 parent f702253 commit 8edfbc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/SharedUI/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
{
syncResponse = await _apiClient.SyncPostAsync(new SyncPostRequest() { WorkoutIds = TodaysWorkouts.Select(w => w!.Id!).ToList() });
}
catch (FlurlHttpTimeoutException te)
catch (SyncTimeoutException te)
{
_toaster.AddInformation("Long running sync will continue running in the background.");
Log.Information("UI - Sync timeout reached.", te);
Expand Down
1 change: 1 addition & 0 deletions src/WebUI/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public async Task<SyncPostResponse> SyncPostAsync(SyncPostRequest syncPostReques
try
{
return await $"{_apiUrl}/api/sync"
.WithTimeout(30)
.PostJsonAsync(syncPostRequest)
.ReceiveJson<SyncPostResponse>();
}
Expand Down

0 comments on commit 8edfbc3

Please sign in to comment.