---
title: "MTOfflinePackError | Mobile sdk | Mobile sdk ios | Ios"
description: "Errors that can occur during the offline pack download process."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# MTOfflinePackError

```
public enum MTOfflinePackError : LocalizedError, Equatable
```

Errors that can occur during the offline pack download process.

-   `[invalidBoundingBox](#/s:11MapTilerSDK18MTOfflinePackErrorO18invalidBoundingBoxyA2CmF)`
    
    The bounding box has invalid coordinates.
    
    #### Declaration
    
    Swift
    
    ```
    case invalidBoundingBox
    ```
    
-   `[invalidZoomRange](#/s:11MapTilerSDK18MTOfflinePackErrorO16invalidZoomRangeyA2CmF)`
    
    The provided zoom range is invalid (e.g., min > max, or out of bounds).
    
    #### Declaration
    
    Swift
    
    ```
    case invalidZoomRange
    ```
    
-   `[styleResolutionFailed](#/s:11MapTilerSDK18MTOfflinePackErrorO21styleResolutionFailedyA2CmF)`
    
    The style definition could not be resolved or downloaded.
    
    #### Declaration
    
    Swift
    
    ```
    case styleResolutionFailed
    ```
    
-   `[networkError(_:)](#/s:11MapTilerSDK18MTOfflinePackErrorO07networkF0yACs0F0_pcACmF)`
    
    A network error occurred while planning.
    
    #### Declaration
    
    Swift
    
    ```
    case networkError(Error)
    ```
    
-   `[regionTooLarge](#/s:11MapTilerSDK18MTOfflinePackErrorO14regionTooLargeyA2CmF)`
    
    The region exceeds the allowed tile count or storage limits.
    
    #### Declaration
    
    Swift
    
    ```
    case regionTooLarge
    ```
    
-   `[notImplemented](#/s:11MapTilerSDK18MTOfflinePackErrorO14notImplementedyA2CmF)`
    
    The functionality is not yet implemented.
    
    #### Declaration
    
    Swift
    
    ```
    case notImplemented
    ```
    
-   `[missingAPIKey](#/s:11MapTilerSDK18MTOfflinePackErrorO13missingAPIKeyyA2CmF)`
    
    The API key is missing from the configuration.
    
    #### Declaration
    
    Swift
    
    ```
    case missingAPIKey
    ```
    
-   `[unauthorized](#/s:11MapTilerSDK18MTOfflinePackErrorO12unauthorizedyA2CmF)`
    
    The request was unauthorized (check your API key).
    
    #### Declaration
    
    Swift
    
    ```
    case unauthorized
    ```
    
-   `[resourceNotFound](#/s:11MapTilerSDK18MTOfflinePackErrorO16resourceNotFoundyA2CmF)`
    
    The requested resource (style, tile, etc.) was not found.
    
    #### Declaration
    
    Swift
    
    ```
    case resourceNotFound
    ```
    
-   `[rateLimitExceeded](#/s:11MapTilerSDK18MTOfflinePackErrorO17rateLimitExceededyA2CmF)`
    
    The API rate limit has been exceeded.
    
    #### Declaration
    
    Swift
    
    ```
    case rateLimitExceeded
    ```
    
-   `[serverError(statusCode:)](#/s:11MapTilerSDK18MTOfflinePackErrorO06serverF0yACSi_tcACmF)`
    
    An unexpected server-side error occurred.
    
    #### Declaration
    
    Swift
    
    ```
    case serverError(statusCode: Int)
    ```
    
-   `[sizeMismatch(expected:actual:)](#/s:11MapTilerSDK18MTOfflinePackErrorO12sizeMismatchyACs5Int64V_AFtcACmF)`
    
    The received data size does not match the expected size from the Content-Length header.
    
    #### Declaration
    
    Swift
    
    ```
    case sizeMismatch(expected: Int64, actual: Int64)
    ```
    
-   `[errorDescription](#/s:10Foundation14LocalizedErrorP16errorDescriptionSSSgvp)`
    
    #### Declaration
    
    Swift
    
    ```
    public var errorDescription: String? { get }
    ```
    
-   `[==(_:_:)](#/s:SQ2eeoiySbx_xtFZ)`
    
    #### Declaration
    
    Swift
    
    ```
    public static func == (lhs: MTOfflinePackError, rhs: MTOfflinePackError) -> Bool
    ```
