If for example a client application is (accidentally) firing doubled requests to your API, you might get deadlocks in this case. Which is not bad per se, as you don’t want to conform to that behaviour. But it might also happen if you have two client applications with updates to the same resource (patching different fields for example), in that case you’re blocking one party so a retry mechanism in the client or server side might be a solution.
Just something we noticed a while ago when using transactions.
Plain copy paste without a critical view is not recommended, but it surely provides good pieces of code from time to time. Especially in obscure frameworks/languages, compared to what can be googled.
ChatGPT 4 is a really big difference with 3.5 though. What took me hours together with the 3.5, was fixed in a few minutes with 4.