Is it appropriate for a server to return 503 ("Service Unavailable")
when the requested operation resulted in a database deadlock?
Here is my reasoning:
503 Service Unavailable
anyway.Seeing as:
503 Service Unavailable
anyway.I'm leaning towards this solution. What do you think?
UPDATE: I think returning 503 ("Service Unavailable")
is still acceptable if you wish it, but I no longer think it is technically required. See https://stackoverflow.com/a/17960047/14731.
I think it's fine so long as the entire transaction is rolled back or if the request is idempotent.