Maps deadlock detection to proper status code in transactional endpoint. Fixes #1922