When working with Promise, you do not process the rejected state almost anywhere (you do not use the catch function).
Again, when working with Promise, you mix different styles then / catch (your style) and async / await (obviously from the AWS documentation). Choose one of your styles and stick to it (keep in mind that when working with await the rejected state is reduced to an exception so you have to use a try / catch block).
Generate "unique" identifiers with a random number generator. This seems to work but there is no guarantee that you will not duplicate a key. Usually such data is generated by the database that stores the records. However, for you this functionality is limited due to the choice of NoSql database. And this requires you to implement your own counters (which to use as an identifier).
Hello, I am kunaal a fullstack developer.I have a youtube channel "Modern Web" where I teach to make awesome web UI/ UX. Don't forget to checkout my youtube channel
Hello, I am kunaal a fullstack developer.I have a youtube channel "Modern Web" where I teach to make awesome web UI/ UX. Don't forget to checkout my youtube channel
what error is it? in my post I am not referring to an error made by the author, but I am pointing out implementation details that I do not like how they are implemented (because they can lead to an error).
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I have a few remarks:
When working with
Promise
, you do not process the rejected state almost anywhere (you do not use thecatch
function).Again, when working with
Promise
, you mix different stylesthen
/catch
(your style) andasync
/await
(obviously from the AWS documentation). Choose one of your styles and stick to it (keep in mind that when working withawait
the rejected state is reduced to an exception so you have to use atry
/catch
block).Generate "unique" identifiers with a random number generator. This seems to work but there is no guarantee that you will not duplicate a key. Usually such data is generated by the database that stores the records. However, for you this functionality is limited due to the choice of NoSql database. And this requires you to implement your own counters (which to use as an identifier).
I'll say its very good that you are pointing the mistakes so that future comers can improve the issues. ππ
Okay, i got it. I'll fix this and try to improve next timeπ
@mcwolfmm Can you help us clearing this error?
what error is it? in my post I am not referring to an error made by the author, but I am pointing out implementation details that I do not like how they are implemented (because they can lead to an error).