Improve error handling in synchronous command invocation (OMS-545)