---
title: Reference Overview
slug: devicepark/sdk-documentation/reference/overview
description: Review the main SDK models, errors and cleanup order.
docTags: 
createdAt: 2026-08-10T08:03:45.197Z
---

This page is a short orientation. Use the linked reference pages when generating integration code or validating an SDK response.

## Main Models

| Model          | Important fields                                                                          |
| -------------- | ----------------------------------------------------------------------------------------- |
| `Device`       | `serial`, `marketName`, `platform`, `platformVersion`, `state`, `isSimulator`, `isPublic` |
| `DeviceApp`    | `bundleIdentifier`, `installedAt`, `updatedAt`, `isDefault`                               |
| `Pool`         | `id`, `name`, `isDefault`                                                                 |
| `Allocation`   | `allocationId`, `deviceSerial`, `position`, `expiresAt`                                   |
| `Session`      | `sessionId`, `allocationId`, `state`, `videoRecordingScope`, device and recording fields  |
| `ScreenRecord` | `fileKey`, `downloadUrl`, `duration`                                                      |
| `Application`  | `fileKey`, `version`, `revision`, `downloadUrl`                                           |

Response fields can be `null` while Device Park is preparing or assigning a resource. Check identifiers before using them in the next SDK method.

Examples:

- `Allocation.deviceSerial` can be `null` while waiting in the queue.
- `Session.endDate` can be `null` while the session is active.
- `Session.videoRecordUrl` can be `null` until recording processing finishes.
- Signed download URLs can expire and should not be stored as permanent identifiers.

## Node.js Errors

| Error                          | Meaning                                      |
| ------------------------------ | -------------------------------------------- |
| `DeviceParkConfigError`        | Invalid SDK configuration or method argument |
| `DeviceParkHttpError`          | Device Park returned a non-success response  |
| `DeviceParkSerializationError` | Response JSON could not be parsed            |

```typescript
try {
  await client.devices().list();
} catch (error) {
  if (error instanceof DeviceParkHttpError) {
    console.error(error.status, error.body);
  } else {
    throw error;
  }
}
```

Java validates required configuration and arguments with `IllegalArgumentException`. Never log credentials, tokens or authorization headers when reporting failures.

## .NET Errors

| Error                              | Meaning                                      |
| ---------------------------------- | -------------------------------------------- |
| `DeviceParkConfigException`        | Invalid SDK configuration or method argument |
| `DeviceParkHttpException`          | Device Park returned a non-success response  |
| `DeviceParkSerializationException` | Response JSON could not be parsed            |

All types live in `Testinium.DevicePark.Errors` and derive from `DeviceParkException`.

```csharp
try
{
    await client.Devices.ListAsync();
}
catch (DeviceParkHttpException error)
{
    Console.Error.WriteLine($"{error.Status} {error.ErrorCode} {error.ErrorMessage}");
}
```

`DeviceParkHttpException` also parses the backend error envelope into `ErrorCode` and `ErrorMessage`; both are `null` when the response does not use it. `Body` always carries the raw response. A request timeout surfaces as `TaskCanceledException`.

For exact fields, nullability and JSON shapes, see [Model Contracts](docId:-CQFsjSE5Bf_dV5p4FT7S). For catch patterns and timeout behavior, see [Error Handling](docId\:nZrw0_UkMOapMnZtgQtMI).

## Handle Failures

- Configuration errors indicate missing or invalid client configuration.
- HTTP errors contain the response status and body returned by Device Park.
- Network failures and request timeouts can occur before a response exists; handle them separately from HTTP errors.
- Preserve the original test failure when cleanup also fails.

## Cleanup Failures

Attempt cleanup in this order:

1. Stop active sessions.
2. Release allocations that will not be reused.
3. Close the SDK client.

Log cleanup errors with their resource identifiers, but do not replace the original test error with a later cleanup error.
