# ovok_sdk.http.error_response

Canonical page: https://docs.ovok.com/python-sdk/reference/http/error_response

Conversion of error responses into `OvokError`s.

## error_from_response() [#error_from_response]

```python
error_from_response(response: OvokResponse) -> OvokError
```

Reads Core's problem body, its legacy Nest body, or a FHIR OperationOutcome; headers win over the body.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `response` | `OvokResponse` |  | A non-2xx response. |

**Returns**

- `OvokError`: The `OvokError` subclass for the status, carrying the parsed details.

## read_field_errors() [#read_field_errors]

```python
read_field_errors(payload: JsonObject) -> list[FieldError]
```

Collect the invalid fields an error body names, from any of its supported shapes.
