Skip to content

Commit 2cddba0

Browse files
committed
BN-37 | Fix. Remove Unused Error Constants
1 parent a3502ff commit 2cddba0

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/constants/errors.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
* Used for consistent error handling across the application
44
*/
55
export const CONFIG_ERROR_MESSAGES = {
6+
CONFIG_NOT_FOUND: 'Configuration not found',
67
VALIDATION_FAILED: 'Configuration validation failed',
78
NO_DASHBOARDS: 'No dashboards found in configuration',
8-
DEPARTMENT_FETCH_FAILED: (name: string) =>
9-
`Failed to load ${name} configuration`,
109
INVALID_CONFIG: 'Invalid configuration format',
1110
SCHEMA_VALIDATION_FAILED: 'Configuration does not match required schema',
1211
} as const;

src/services/configService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const getConfig = async <T extends AppConfig>(
2020
// Fetch configuration from server
2121
const config = await fetchConfig<T>(configPath);
2222
if (!config) {
23-
throw new Error(CONFIG_ERROR_MESSAGES.FETCH_FAILED);
23+
throw new Error(CONFIG_ERROR_MESSAGES.CONFIG_NOT_FOUND);
2424
}
2525

2626
// Validate configuration against schema

0 commit comments

Comments
 (0)