# Error Returns

{% hint style="danger" %}
400: Bad Request
{% endhint %}

#### No Query

No payload provided in the body of the request.&#x20;

```javascript
{
    "meta": {
        "timestamp": "2019-10-21T13:02:48"
    },
    "error": {
        "message": "No Query",
        "code": "IN0"
    }
}
```

#### Query Not Parsable

Input JSON not valid.&#x20;

```javascript
{
    "meta": {
        "timestamp": "2019-10-21T13:04:26"
    },
    "error": {
        "message": "Query Not Parsable",
        "code": "IN1",
        "detail": "{the payload body}"
    }
}
```

#### Bad Login

Invalid username or password.

```javascript
{
    "meta": {
        "timestamp": "2019-10-21T13:06:12"
    },
    "error": {
        "message": "Bad Login",
        "code": "AUTH0"
    }
}
```

#### No Target

No target object provided in the body of the request.

```javascript
{
    "meta": {
        "timestamp": "2019-10-21T13:17:30"
    },
    "error": {
        "message": "No Target",
        "code": "QRY0",
        "detail": "This service requires a target to be specified."
    }
}
```

#### Missing Required Input

One or more of the required input attributes are missing or empty.

```javascript
{
    "meta": {
        "timestamp": "2019-10-21T13:19:46"
    },
    "error": {
        "message": "Missing Required Input",
        "code": "QRY1",
        "detail": "Service requires Address to be specified."
    }
}
```

#### Input Failed Validation

One or more of the input fields are not being sent as described.&#x20;

```javascript
{
    "meta": {
        "timestamp": "2019-10-21T13:21:08"
    },
    "error": {
        "message": "Input Failed Validation",
        "code": "QRY2",
        "detail": "Age input must conform to (^[<>]=?[0-9]{1,3}$|^[0-9]{1,3}[+-]$|^[0-9]{1,3}-[0-9]{1,3}$)."
    }
}
```

#### Token Bad or Expired

The token you are sending for quiz scoring is either invalid or has expired.&#x20;

```javascript
{
    "meta": {
        "timestamp": "2019-10-23T11:36:49"
    },
    "error": {
        "message": "Token Bad or Expired",
        "code": "QRY6",
        "detail": "1bauxkpczhdiyy3vqm15ais8ue12u7zw"
    }
}
```

{% hint style="danger" %}
403: Forbidden
{% endhint %}

#### User Not Active

The API user is not an active account.&#x20;

```javascript
{
    "meta": {
        "timestamp": "2019-10-21T13:15:24"
    },
    "error": {
        "message": "User Not Active",
        "code": "AUTH3",
        "detail": "This user account (username) is not currently active."
    }
}
```

{% hint style="danger" %}
404: Not Found
{% endhint %}

#### No Such Service

Invalid or empty service name provided.&#x20;

```javascript
{
    "meta": {
        "timestamp": "2019-10-21T13:07:17"
    },
    "error": {
        "message": "No Such Service",
        "code": "AUTH1",
        "detail": "Request service not found."
    }
}
```
