# error

> Returns an error message if there was an error during the download (Read Only).

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.UnityWebRequestWWWModule

> **Warning:**
>
> **Deprecated.** Use UnityWebRequest, a fully featured replacement which is more efficient and has additional features

```csharp
public string error { get; }
```

### Remarks

If there was no error, `error` will return `null` or an empty string (this is because some platforms don't allow nulls for string values). We recommend that you use String.IsNullOrEmpty to check for the presence of an error so that both cases are covered.

If the object has not finished downloading the data, it will block until the download has finished. Use [\_isDone](/engine/6000.7/script-reference/unityengine/www/isdone.md) or `yield` to see if the data is available.

In the example the URL is not valid so the error message will be "Couldn't resolve host".

### Examples

```csharp
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
    // Make a request with an invalid url
    public string url = "invalid_url";
    IEnumerator Start()
    {
        using (WWW www = new WWW(url))
        {
            yield return www;
            if (!string.IsNullOrEmpty(www.error))
                Debug.Log(www.error);
        }
    }
}
```
