I'm asking on a bit of a whim as I'm no convinced this is possible to due the way time works, but was wondering if anyone had encountered a solution to this.
Would it be possible to make multiple async calls to different API endpoints that depend on each other atomic? In the sense that should one of them fail - none of them execute?
For example, if we needed to make 2 API requests, the first to POST a user and the second to make a POST using the ID returned from the first request. However, if I was unable to complete the second POST request - the user would not be created. Without this dependency I would default to using something such as Promise.all() however since I'm dependant on the result of the first call I don't think this would be the correct approach.