Modified rpc to make it easier to parse errors.