Check error code when no completion function is defined as well