update to determine whether success or failure of invocation on the stat
according to http status code as well