File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
packages/util-dynamodb/src Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -63,13 +63,13 @@ describe("convertToAttr", () => {
6363
6464 expect ( ( ) => {
6565 convertToAttr ( num , { convertClassInstanceToMap } ) ;
66- } ) . toThrowError ( `${ errorPrefix } Use BigInt .` ) ;
66+ } ) . toThrowError ( `${ errorPrefix } Use NumberValue from @aws-sdk/lib-dynamodb .` ) ;
6767
6868 const BigIntConstructor = BigInt ;
6969 ( BigInt as any ) = undefined ;
7070 expect ( ( ) => {
7171 convertToAttr ( num , { convertClassInstanceToMap } ) ;
72- } ) . toThrowError ( `${ errorPrefix } Pass string value instead .` ) ;
72+ } ) . toThrowError ( `${ errorPrefix } Use NumberValue from @aws-sdk/lib-dynamodb .` ) ;
7373 BigInt = BigIntConstructor ;
7474 } ) ;
7575 } ) ;
@@ -81,13 +81,13 @@ describe("convertToAttr", () => {
8181
8282 expect ( ( ) => {
8383 convertToAttr ( num , { convertClassInstanceToMap } ) ;
84- } ) . toThrowError ( `${ errorPrefix } Use BigInt .` ) ;
84+ } ) . toThrowError ( `${ errorPrefix } Use NumberValue from @aws-sdk/lib-dynamodb .` ) ;
8585
8686 const BigIntConstructor = BigInt ;
8787 ( BigInt as any ) = undefined ;
8888 expect ( ( ) => {
8989 convertToAttr ( num , { convertClassInstanceToMap } ) ;
90- } ) . toThrowError ( `${ errorPrefix } Pass string value instead .` ) ;
90+ } ) . toThrowError ( `${ errorPrefix } Use NumberValue from @aws-sdk/lib-dynamodb .` ) ;
9191 BigInt = BigIntConstructor ;
9292 } ) ;
9393 } ) ;
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ const convertToStringAttr = (data: string | String): { S: string } => ({ S: data
157157const convertToBigIntAttr = ( data : bigint ) : { N : string } => ( { N : data . toString ( ) } ) ;
158158
159159const validateBigIntAndThrow = ( errorPrefix : string ) => {
160- throw new Error ( `${ errorPrefix } ${ typeof BigInt === "function" ? " Use BigInt." : "Pass string value instead." } ` ) ;
160+ throw new Error ( `${ errorPrefix } Use NumberValue from @aws-sdk/lib-dynamodb. ` ) ;
161161} ;
162162
163163const convertToNumberAttr = ( num : number | Number ) : { N : string } => {
You can’t perform that action at this time.
0 commit comments