Move status code determination to wrapper function.