test status code from return value