Thats a good question :-) I couldn't find a list of possible exceptions for promises.mkdir
My proposed solution would be to not catch any exceptions, but instead do a check if the dir exists first, and only if it doesn't try to create it. In that case you would be safe to report any errors back to the user.
But then again that would ruin your 3 lines example ;-)
Thank you for the advice. I didn't think of that. Would fire right back in cloud environments 😅
Is there any reference of errors that I can look up for the error codes?
Thats a good question :-) I couldn't find a list of possible exceptions for promises.mkdir
My proposed solution would be to not catch any exceptions, but instead do a check if the dir exists first, and only if it doesn't try to create it. In that case you would be safe to report any errors back to the user.
But then again that would ruin your 3 lines example ;-)
Exactly! Not so catchy anymore