# OvokApiException

Canonical page: https://docs.ovok.com/java-sdk/reference/ovok-api-exception

```java
public class OvokApiException extends OvokException
```

Extends [`OvokException`](/java-sdk/reference/ovok-exception), and inherits its methods.

Thrown when the Ovok API answers with a non-2xx status that has no more specific subclass.

## Constructors [#constructors]

### OvokApiException [#ovokapiexception]

```java
public OvokApiException(int statusCode, String body)
```

Creates an exception for a status and raw body.

**Parameters:**

- `statusCode`: the HTTP status
- `body`: the raw response body

## Methods [#methods]

### statusCode [#statuscode]

```java
public int statusCode()
```

Returns the HTTP status.

**Returns:** the HTTP status
