Skip to content

Commit 2a2f1e1

Browse files
committed
Handles decode errors as missing cache
Updates error handling to treat decode failures as missing cache instead of logging or propagating errors. This ensures robustness when decoding cached data and prevents unintended application breakdowns due to invalid cache contents.
1 parent d577e9d commit 2a2f1e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/features/projects/domain/ProjectRepository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default class ProjectRepository implements IProjectRepository {
2424
}
2525
try {
2626
return ZodJSONCoder.decode(ProjectSchema.array(), string)
27-
} catch (err) {
27+
} catch (_err) { // swallow decode errors and treat as missing cache
2828
return undefined
2929
}
3030
}

0 commit comments

Comments
 (0)