#14052
refactor(config): return Result instead of throwing and hand-catching ConfigurationError in IdaConfiguration and KiloClientLocation
Summary
scripts/verify/baselines/hand-caught-configuration-error.json currently tolerates hand-caught ConfigurationError sites in src/ida/IdaConfiguration.ts and src/application/SupportedClientLocations.ts:
readIdaConfigurationthrewregistrationTooLarge()insidewithOwnedRegularFileonly to immediately catchConfigurationErrorand convert it back toerr(cause).kiloInlineConfigurationandkiloGlobalLocationthrewConfigurationError, forcingSupportedClientLocations.kiloLayeredLocationto catchConfigurationErrorby hand.
Proposed Change
Return Result<..., ConfigurationError> directly from the withOwnedRegularFile callback in IdaConfiguration.ts and from kiloInlineConfiguration / kiloGlobalLocation in KiloClientLocation.ts, delete both hand-caught ConfigurationError branches, and lower scripts/verify/baselines/hand-caught-configuration-error.json.
Activity
0No activity yet.