Skip to content

Commit 06bc738

Browse files
committed
feat: add Sentry error tracking for failed directory removal attempts in safeRemoveDirectory
1 parent 273f503 commit 06bc738

File tree

1 file changed

+11
-0
lines changed
  • src/backend/storeManagers/hyperplay

1 file changed

+11
-0
lines changed

src/backend/storeManagers/hyperplay/utils.ts

+11
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { existsSync, rmSync } from 'graceful-fs'
2222
import { ProjectMetaInterface } from '@valist/sdk/dist/typesShared'
2323
import getPartitionCookies from 'backend/utils/get_partition_cookies'
2424
import { DEV_PORTAL_URL } from 'common/constants'
25+
import { captureException } from '@sentry/electron'
2526

2627
export async function getHyperPlayStoreRelease(
2728
appName: string
@@ -486,6 +487,16 @@ export async function safeRemoveDirectory(
486487
`Failed to remove directory ${directory} on attempt ${attempt}/${maxRetries}, directory still exists`,
487488
LogPrefix.HyperPlay
488489
)
490+
captureException(
491+
new Error(`Failed to remove directory, directory still exists`),
492+
{
493+
extra: {
494+
directory,
495+
attempts: attempt,
496+
method: 'safeRemoveDirectory'
497+
}
498+
}
499+
)
489500
} catch {
490501
// Directory doesn't exist (access threw an error), removal succeeded
491502
logInfo(

0 commit comments

Comments
 (0)