-
Notifications
You must be signed in to change notification settings - Fork 57
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
Error in parseModel
-> normalize indexes
#126
Comments
Thank you for reaching out! Does your model throw when using the electrodb playground? If so, would you be able to provide a playground like that demonstrates the issue? If not, would you be able to provide the version you are using, and a model that causes this exception? |
It doesn't throw out when using the playground, I'll get you my model and version now, thanks! |
We are on version 1.8.4 |
Our model is as follows (i have taken out any attribute which is not used for our indexes)
|
Im also having an issue when trying to complete a put operation with an attribute which is a list i'm getting a validation error
|
@calebwilson706 I took the steps to reproduce, installing electrodb at the version you specified ( In the cloudwatch logs you shared it looks like the indexes are finding async functions for I completely understand the need to sanitize models, though I think some of the dynamic implementation of the models might be at play here. The playground uses the same version as you have reported, so if you are able to recreate the issue there (even with "fake" attributes) that would be very helpful to help diagnose further. Regarding the I cannot speak for the type of data being passed (the value is not logged or captured in the error to avoid leaking private data) but it does seem to be working as designed: the value received was not of the expected type. For example, a The best course of action would be to add logging or further validation near the use of this put. I'll leave this ticket open to maintain communication with you 👍 |
Hello, sorry for the delay - we have found this source of our issue. We have some helper methods which modify the array prototype to give us some extension method helpers
because there is a from the mozilla docs
Thanks! |
i can update anywhere the for in loop is used if you would like, i'm not seeing any guide on contributing |
We are getting this error message when trying to put an item in to our database, from some debugging and logs we can see that when looping through the access patterns that there are extra access patterns after our defined ones which are return undefined for the index and hence throwing the issue above, some cloudwatch logs below show the extra "access patterns"
The text was updated successfully, but these errors were encountered: