Ensure return error status checked from C API calls