operations: Return structured errors in UserRevert
Modify the RPC UserRevert to return structured errors instead of inline errors. Modify the handling of the following four errors: 'Conflict', 'Changes Already Applied', 'Branch diverged', and 'CustomHookError'. Returns the corresponding structured error.
Closes: #5630 (closed)