Merge branch 's3-logging' into 'develop'
Log the concatenated S3 url if constructing the S3 client fails. See merge request firefish/firefish!10531
This commit is contained in:
commit
19762bd955
1 changed files with 17 additions and 13 deletions
|
@ -11,6 +11,7 @@ export function getS3(meta: Meta) {
|
||||||
}`
|
}`
|
||||||
: `${meta.objectStorageUseSSL ? "https://" : "http://"}example.net`;
|
: `${meta.objectStorageUseSSL ? "https://" : "http://"}example.net`;
|
||||||
|
|
||||||
|
try {
|
||||||
return new S3({
|
return new S3({
|
||||||
endpoint: meta.objectStorageEndpoint || undefined,
|
endpoint: meta.objectStorageEndpoint || undefined,
|
||||||
accessKeyId: meta.objectStorageAccessKey!,
|
accessKeyId: meta.objectStorageAccessKey!,
|
||||||
|
@ -24,4 +25,7 @@ export function getS3(meta: Meta) {
|
||||||
agent: getAgentByUrl(new URL(u), !meta.objectStorageUseProxy),
|
agent: getAgentByUrl(new URL(u), !meta.objectStorageUseProxy),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
} catch (e) {
|
||||||
|
throw new Error(`Failed to construct S3 client, assembled S3 URL: ${u}\n${e}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue