-
-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] null type error message shows as object #1077
Comments
This also appears to implicate the use of the In my example and use case I am interfacing with a third party and caching data from them. I am attempting to use one of my columns to store an object that has dynamic keys. So I have a schema like this: const peopleCacheSchema = new dynamoose.Schema(
{
accountId: { type: Number, hashKey: true },
personId: { type: String, rangeKey: true },
firstName: String,
lastName: String,
phone: String,
email: String,
customFields: {
type: Object,
}
},
{
saveUnknown: ["customFields.**"],
timestamps: {
createdAt: ["createAt"],
updatedAt: ["updateAt"],
},
},
); If the third party has a key/value pair in the
|
@isupremedyou What version of Dynamoose are you using? |
@fishcharlie |
So the This issue still exists on 2.5.0. But try your thing on 2.5.0, and let me know how it goes. I think it should work, but I don't understand all the details of your issue. |
Summary:
If your document has a
null
attribute value, and your schema doesn't allow fornull
type, you get an error saying:Ideally this would be:
Current output and behavior (including stack trace):
Expected output and behavior:
Environment:
Operating System: macOS
Operating System Version: 11.1 (20C69)
Node.js version (
node -v
): v14.0.0NPM version: (
npm -v
): 6.14.4Dynamoose version: v2.5.0
Other information (if applicable):
https://dynamoose.slack.com/archives/CG4B7RL8N/p1607747047084500?thread_ts=1607743869.070600&cid=CG4B7RL8N
Other:
The text was updated successfully, but these errors were encountered: