Greatly improved error reporting for failed invocations