Managing Resources in TypeScript with S3: Handling Bucket Creation and Deletion
I'm looking at the "Resource Management" chapter of the docs and I was wondering about this piece of code:
what can I do if
Here,
what if it can also give back an
what can I do if
deleteBucket can also fail? how do I recover from that using acquireRelease?Here,
deleteBucket has no error case:what if it can also give back an
S3Error? (for example I was able to create the bucket, but there is a connection error and deleteBucket fails.