fix: type error when user add port for s3 storages.

This commit is contained in:
charlesgauthereau
2026-02-19 21:09:56 +01:00
parent 4ce38d9857
commit 9116b4d126
3 changed files with 6 additions and 3 deletions
@@ -51,7 +51,8 @@ export const ChannelTestButton = ({channel, organizationId, kind}: NotifierTestC
toast.success("Successfully connected to storage channel"); toast.success("Successfully connected to storage channel");
} else { } else {
console.error(result); console.error(result);
toast.error("An error occurred while testing the storage channel, check your configuration"); const responseText = result.response ? `(${result.response})` : "";
toast.error(`An error occurred while testing the storage channel, check your configuration ${responseText}`);
} }
} else { } else {
toast.error("Not yet supported"); toast.error("Not yet supported");
+3 -1
View File
@@ -97,12 +97,14 @@ export async function dispatchStorage(
} }
return await dispatchViaProvider( const dispatchResult = await dispatchViaProvider(
channel.provider as StorageProviderKind, channel.provider as StorageProviderKind,
channel.config, channel.config,
input, input,
); );
console.log(dispatchResult);
return dispatchResult;
} catch (err: any) { } catch (err: any) {
return { return {
+1 -1
View File
@@ -18,7 +18,7 @@ async function getS3Client(config: S3Config) {
region: config.region ?? "us-east-1", region: config.region ?? "us-east-1",
accessKey: config.accessKey, accessKey: config.accessKey,
secretKey: config.secretKey, secretKey: config.secretKey,
port: config.port ?? 443, port: config.port ? Number(config.port) : 443,
useSSL: config.ssl ?? true, useSSL: config.ssl ?? true,
}); });
} }