Skip to content

Commit d9c794b

Browse files
committed
fix: use isPlatformError helper in remove() instead of instanceof check
Replace 'cause instanceof PlatformError.PlatformError' with 'isPlatformError(cause)' in the remove method for consistency with the rest of the file and to avoid instanceof fragility across module boundaries.
1 parent e016fe7 commit d9c794b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/server/src/auth/Layers/ServerSecretStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const makeServerSecretStore = Effect.gen(function* () {
126126
const remove: ServerSecretStoreShape["remove"] = (name) =>
127127
fileSystem.remove(resolveSecretPath(name)).pipe(
128128
Effect.catch((cause) =>
129-
cause instanceof PlatformError.PlatformError && cause.reason._tag === "NotFound"
129+
isPlatformError(cause) && cause.reason._tag === "NotFound"
130130
? Effect.void
131131
: Effect.fail(
132132
new SecretStoreError({

0 commit comments

Comments
 (0)