File tree 2 files changed +5
-5
lines changed
packages/util-dynamodb/src
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -63,13 +63,13 @@ describe("convertToAttr", () => {
63
63
64
64
expect ( ( ) => {
65
65
convertToAttr ( num , { convertClassInstanceToMap } ) ;
66
- } ) . toThrowError ( `${ errorPrefix } Use BigInt .` ) ;
66
+ } ) . toThrowError ( `${ errorPrefix } Use NumberValue from @aws-sdk/lib-dynamodb .` ) ;
67
67
68
68
const BigIntConstructor = BigInt ;
69
69
( BigInt as any ) = undefined ;
70
70
expect ( ( ) => {
71
71
convertToAttr ( num , { convertClassInstanceToMap } ) ;
72
- } ) . toThrowError ( `${ errorPrefix } Pass string value instead .` ) ;
72
+ } ) . toThrowError ( `${ errorPrefix } Use NumberValue from @aws-sdk/lib-dynamodb .` ) ;
73
73
BigInt = BigIntConstructor ;
74
74
} ) ;
75
75
} ) ;
@@ -81,13 +81,13 @@ describe("convertToAttr", () => {
81
81
82
82
expect ( ( ) => {
83
83
convertToAttr ( num , { convertClassInstanceToMap } ) ;
84
- } ) . toThrowError ( `${ errorPrefix } Use BigInt .` ) ;
84
+ } ) . toThrowError ( `${ errorPrefix } Use NumberValue from @aws-sdk/lib-dynamodb .` ) ;
85
85
86
86
const BigIntConstructor = BigInt ;
87
87
( BigInt as any ) = undefined ;
88
88
expect ( ( ) => {
89
89
convertToAttr ( num , { convertClassInstanceToMap } ) ;
90
- } ) . toThrowError ( `${ errorPrefix } Pass string value instead .` ) ;
90
+ } ) . toThrowError ( `${ errorPrefix } Use NumberValue from @aws-sdk/lib-dynamodb .` ) ;
91
91
BigInt = BigIntConstructor ;
92
92
} ) ;
93
93
} ) ;
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ const convertToStringAttr = (data: string | String): { S: string } => ({ S: data
157
157
const convertToBigIntAttr = ( data : bigint ) : { N : string } => ( { N : data . toString ( ) } ) ;
158
158
159
159
const 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. ` ) ;
161
161
} ;
162
162
163
163
const convertToNumberAttr = ( num : number | Number ) : { N : string } => {
You can’t perform that action at this time.
0 commit comments