You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I wanted to make a log of this issue I've had that is related to this package. It looks like the function labelValueProvider is defined as returning either string or undefined. Later the returned value of labelValueProvider is being cast as a string and then length is being using against the same value.
I've not looked too much into this problem as I have some compiling complexities making this issue difficult to trace. In my issue I'm having a problem on line 16 where Cannot read properties of null (reading 'length') is the result. So I'm thinking labelValueProvider returns string, undefined or null?
I'm having this problem where @smithy/core is being used by @aws-sdk/client-cloudfront and my request looks as follows
constcloudfrontClient=newCloudFrontClient({})constdistroResult=awaitthis.cloudfrontClient.send(newGetDistributionCommand({Id: 'myCloudfrontDistroId',// could potentially be undefined?}),)
granted, my problem could be my implementation and not recieving the correct error?
I'm going to dig deeper into my issue, it would appear for now that the issue was introduced from our updating to ^3.675.0 potentially and persists in my upadting to ^3.750.0. However, regardless I would recommend the condition be improved for type safety and avoid the type casting.
I'm using node 18 within a lambda and heavily compiling the code using tsup and I reckon the problem could be a result of the complexity of compiling the typescript with tsup and configs. Wanted to bring the type casting issue to your attention though. Hopefully this makes sense and is helpful to someone
The text was updated successfully, but these errors were encountered:
After debugging I've realised the value I'm using within the GetDistributionCommand was in fact null. So I reckon the value being passed to the function is potentially null and being type cast as string? I'm not too clued up on this package so couldn't say for sure
Hello, I wanted to make a log of this issue I've had that is related to this package. It looks like the function
labelValueProvider
is defined as returning either string or undefined. Later the returned value oflabelValueProvider
is being cast as a string and then length is being using against the same value.smithy-typescript/packages/core/src/submodules/protocols/resolve-path.ts
Lines 6 to 16 in 1db3e9f
I've not looked too much into this problem as I have some compiling complexities making this issue difficult to trace. In my issue I'm having a problem on line 16 where
Cannot read properties of null (reading 'length')
is the result. So I'm thinkinglabelValueProvider
returns string, undefined or null?I'm having this problem where @smithy/core is being used by @aws-sdk/client-cloudfront and my request looks as follows
I'm going to dig deeper into my issue, it would appear for now that the issue was introduced from our updating to
^3.675.0
potentially and persists in my upadting to^3.750.0
. However, regardless I would recommend the condition be improved for type safety and avoid the type casting.I'm using node 18 within a lambda and heavily compiling the code using tsup and I reckon the problem could be a result of the complexity of compiling the typescript with tsup and configs. Wanted to bring the type casting issue to your attention though. Hopefully this makes sense and is helpful to someone
The text was updated successfully, but these errors were encountered: