Skip to content

Commit 3131298

Browse files
committed
change(config): Temporary solution for errors when loading store config
1 parent b038f16 commit 3131298

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

libs/server/config.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ enum ErrTitle {
5959
CONFIG_FILE_READ_FAIL = 'Failed to load configuration file',
6060
INVALID_AUTH_CONFIG = 'Invalid authorisation configuration',
6161
CONFIG_FILE_PARSE_FAIL = 'Could not parse configuration file',
62+
INVALID_STORE_CONFIG = 'Invalid store configuration',
6263
}
6364

6465
export function loadConfigAndListErrors(): {
@@ -212,7 +213,7 @@ export function loadConfigAndListErrors(): {
212213
store = baseConfig.store;
213214
}
214215
// for now, this works
215-
{
216+
try {
216217
store.detectCredentials ??= true;
217218
store.accessKey =
218219
env.getEnvRaw(
@@ -240,6 +241,15 @@ export function loadConfigAndListErrors(): {
240241
env.getEnvRaw('DIRECT_RESPONSE_ATTACHMENT', false),
241242
store.proxyAttachments ?? false
242243
);
244+
} catch (e) {
245+
errors.push({
246+
name: ErrTitle.INVALID_STORE_CONFIG,
247+
description: 'Could not load configuration for store',
248+
severity: IssueSeverity.FATAL_ERROR,
249+
category: IssueCategory.CONFIG,
250+
cause: coerceToValidCause(e),
251+
fixes: []
252+
});
243253
}
244254

245255
let server: ServerConfiguration;

0 commit comments

Comments
 (0)