---
title: "MTError | Mobile sdk | Mobile sdk ios | Ios"
description: "Represents all the errors that can occur in the MapTiler SDK."
---

> 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.

# MTError

```
public enum MTError : Error, LocalizedError
```

Represents all the errors that can occur in the MapTiler SDK.

All methods within the SDK throw MTError.

-   `[exception(body:)](#/s:11MapTilerSDK7MTErrorO9exceptionyAcA11MTExceptionV_tcACmF)`
    
    Method execution failed with exception.
    
    #### Declaration
    
    Swift
    
    ```
    case exception(body: MTException)
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>body</em></code></td><td><div><p>Exception details.</p></div></td></tr></tbody></table>
    
-   `[invalidResultType(description:)](#/s:11MapTilerSDK7MTErrorO17invalidResultTypeyACSS_tcACmF)`
    
    Method execution returned an invalid result.
    
    #### Declaration
    
    Swift
    
    ```
    case invalidResultType(description: String)
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>description</em></code></td><td><div><p>Debug description of the return type.</p></div></td></tr></tbody></table>
    
-   `[unsupportedReturnType(description:)](#/s:11MapTilerSDK7MTErrorO21unsupportedReturnTypeyACSS_tcACmF)`
    
    Method execution returned unsupported type.
    
    #### Declaration
    
    Swift
    
    ```
    case unsupportedReturnType(description: String)
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>description</em></code></td><td><div><p>Debug description of the command that returned unsupported type.</p></div></td></tr></tbody></table>
    
-   `[unknown(description:)](#/s:11MapTilerSDK7MTErrorO7unknownyACSS_tcACmF)`
    
    Method execution resulted in an unknown error.
    
    #### Declaration
    
    Swift
    
    ```
    case unknown(description: String)
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>description</em></code></td><td><div><p>Debug description of error.</p></div></td></tr></tbody></table>
    
-   `[bridgeNotLoaded](#/s:11MapTilerSDK7MTErrorO15bridgeNotLoadedyA2CmF)`
    
    Method execution halted. Bridge and/or Map are not loaded.
    
    #### Declaration
    
    Swift
    
    ```
    case bridgeNotLoaded
    ```
    
-   `[missingParent](#/s:11MapTilerSDK7MTErrorO13missingParentyA2CmF)`
    
    Method execution failed due to missing parent entity.
    
    #### Declaration
    
    Swift
    
    ```
    case missingParent
    ```
    
-   `[offlineServerFailed](#/s:11MapTilerSDK7MTErrorO19offlineServerFailedyA2CmF)`
    
    Offline server failed to start or is not running.
    
    #### Declaration
    
    Swift
    
    ```
    case offlineServerFailed
    ```
    
-   `[code](#/s:11MapTilerSDK7MTErrorO4codeSivp)`
    
    Numerical code of the exception.
    
    #### Declaration
    
    Swift
    
    ```
    public var code: Int { get }
    ```
    
-   `[reason](#/s:11MapTilerSDK7MTErrorO6reasonSSvp)`
    
    Explanation of the exception.
    
    #### Declaration
    
    Swift
    
    ```
    public var reason: String { get }
    ```
    
-   `[errorDescription](#/s:10Foundation14LocalizedErrorP16errorDescriptionSSSgvp)`
    
    #### Declaration
    
    Swift
    
    ```
    public var errorDescription: String? { get }
    ```
