# MGLErrorCode

    enum MGLErrorCode {}

Error constants for the Mapbox SDK.

- `MGLErrorCodeUnknown`

  An unknown error occurred.

  #### Declaration

  Objective-C

      MGLErrorCodeUnknown = -1

  Swift

      case unknown = -1

  View Source on GitHub
- `MGLErrorCodeNotFound`

  The resource could not be found.

  #### Declaration

  Objective-C

      MGLErrorCodeNotFound = 1

  Swift

      case notFound = 1

  View Source on GitHub
- `MGLErrorCodeBadServerResponse`

  The connection received an invalid server response.

  #### Declaration

  Objective-C

      MGLErrorCodeBadServerResponse = 2

  Swift

      case badServerResponse = 2

  View Source on GitHub
- `MGLErrorCodeConnectionFailed`

  An attempt to establish a connection failed.

  #### Declaration

  Objective-C

      MGLErrorCodeConnectionFailed = 3

  Swift

      case connectionFailed = 3

  View Source on GitHub
- `MGLErrorCodeParseStyleFailed`

  A style parse error occurred while attempting to load the map.

  #### Declaration

  Objective-C

      MGLErrorCodeParseStyleFailed = 4

  Swift

      case parseStyleFailed = 4

  View Source on GitHub
- `MGLErrorCodeLoadStyleFailed`

  An attempt to load the style failed.

  #### Declaration

  Objective-C

      MGLErrorCodeLoadStyleFailed = 5

  Swift

      case loadStyleFailed = 5

  View Source on GitHub
- `MGLErrorCodeSnapshotFailed`

  An error occurred while snapshotting the map.

  #### Declaration

  Objective-C

      MGLErrorCodeSnapshotFailed = 6

  Swift

      case snapshotFailed = 6

  View Source on GitHub
- `MGLErrorCodeSourceIsInUseCannotRemove`

  Source is in use and cannot be removed

  #### Declaration

  Objective-C

      MGLErrorCodeSourceIsInUseCannotRemove = 7

  Swift

      case sourceIsInUseCannotRemove = 7

  View Source on GitHub
- `MGLErrorCodeSourceIdentifierMismatch`

  Source is in use and cannot be removed

  #### Declaration

  Objective-C

      MGLErrorCodeSourceIdentifierMismatch = 8

  Swift

      case sourceIdentifierMismatch = 8

  View Source on GitHub