# errors

Python API: `hubai_sdk.errors`

Exceptions raised for HubAI API and user-input failures.

Service functions translate HTTP failures into this hierarchy so callers do not need to inspect status codes. Catch
[HubApiError](https://docs.luxonis.com/cloud/hubai/model-registry/hubai-sdk/hubai-sdk-api-reference/errors.md) to handle every
remote API failure, or one of its subclasses when recovery depends on the cause.

## Classes

### HubApiError

Base exception for errors reported by the HubAI API.

#### Methods

##### init

```python
def __init__(message: str, *, status_code: int | None = None):
```

#### Attributes

##### status_code

HTTP status code returned by HubAI, when available.

### InputError

Raised when SDK input is incomplete or internally inconsistent.

### ResourceConflictError

Raised when an operation conflicts with an existing resource.

### ResourceNotFoundError

Raised when a requested HubAI resource cannot be resolved.

#### Methods

##### init

```python
def __init__(identifier: str, endpoint: str):
```

#### Attributes

##### endpoint

API resource collection that was searched.

##### identifier

UUID or slug that could not be resolved.

### ValidationError

Raised when HubAI rejects request fields or values.
