Skip to content

Commit

Permalink
catch errors that may occur when updating last commit date during
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn-kev committed Dec 1, 2023
1 parent 8d50e39 commit 50c171d
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions backend/SyncReverseProxy/ProxyKernel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using OpenTelemetry.Trace;
using Yarp.ReverseProxy.Forwarder;

namespace LexSyncReverseProxy;
Expand Down Expand Up @@ -108,14 +109,22 @@ private static async Task Forward(HttpContext context,
}

await forwarder.SendAsync(context, requestInfo.DestinationPrefix, httpClient);
switch (hgType)
try
{
case HgType.hgWeb:
await eventsService.OnHgRequest(context);
break;
case HgType.resumable:
await eventsService.OnResumableRequest(context);
break;
switch (hgType)
{
case HgType.hgWeb:
await eventsService.OnHgRequest(context);
break;
case HgType.resumable:
await eventsService.OnResumableRequest(context);
break;
}
}
catch (Exception e)
{
Activity.Current?.RecordException(e);
//we don't want to throw errors from the post process event
}
}

Expand Down

0 comments on commit 50c171d

Please sign in to comment.