Open cjhowedev opened 7 years ago
Since this is not yet handled, I contribute with some more improvment suggestions. Add options errorHandler
that takes a function with two arguments, one error code (like DynamoDBResourceInUseException
or DynamoDBAccessDeniedException
) and second argument with the error object. Default error handler just send the error as now, to the console.
Or something like that.
This is implemented in #76. Initialization was moved to the methods, instead of the constructor so thrown errors prevent usage.
When connect-dynamodb creates the table for the first time, it logs the result of the request out to console.log. Is this correct behavior? Doesn't it need to block somehow until the creation of the table is complete? I understand this would require some work on the API, but it also seems like a race condition on whether the table gets created before connect-dynamodb uses it.
https://github.com/ca98am79/connect-dynamodb/blob/master/lib/connect-dynamodb.js#L69-L89