mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
chore: add app insights log for oidc server error (#6815)
add app insights log for oidc server error
This commit is contained in:
parent
4658bd2623
commit
9ca5ae8f30
1 changed files with 3 additions and 0 deletions
|
@ -95,6 +95,9 @@ export default function koaOidcErrorHandler<StateT, ContextT>(): Middleware<Stat
|
||||||
// See https://github.com/panva/node-oidc-provider/blob/37d0a6cfb3c618141a44cbb904ce45659438f821/lib/shared/error_handler.js
|
// See https://github.com/panva/node-oidc-provider/blob/37d0a6cfb3c618141a44cbb904ce45659438f821/lib/shared/error_handler.js
|
||||||
ctx.status = error.statusCode || 500;
|
ctx.status = error.statusCode || 500;
|
||||||
ctx.body = errorOut(error);
|
ctx.body = errorOut(error);
|
||||||
|
|
||||||
|
// Track the original error in App Insights.
|
||||||
|
void appInsights.trackException(error, buildAppInsightsTelemetry(ctx));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse the `parse_error` from the query string.
|
// Parse the `parse_error` from the query string.
|
||||||
|
|
Loading…
Reference in a new issue