mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
switched try/catch to result.fromPromise + capError
This commit is contained in:
parent
442f3037b3
commit
e0deb5208e
@ -599,13 +599,11 @@ export async function claimPreviewPoolLease(options: { apiUrl: string }): Promis
|
||||
apiUrl: options.apiUrl,
|
||||
});
|
||||
|
||||
try {
|
||||
await refreshDummyProjectLiveTokenRefreshEvents(claimed.projectId, getClickhouseAdminClient());
|
||||
} catch (error) {
|
||||
captureError(
|
||||
"preview-pool-live-token-refresh",
|
||||
error instanceof Error ? error : new Error(String(error)),
|
||||
);
|
||||
const liveTokenRefreshResult = await Result.fromPromise(
|
||||
refreshDummyProjectLiveTokenRefreshEvents(claimed.projectId, getClickhouseAdminClient()),
|
||||
);
|
||||
if (liveTokenRefreshResult.status === "error") {
|
||||
captureError("preview-pool-live-token-refresh", liveTokenRefreshResult.error);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user