<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ShazamKit",
  "identifier" : "/documentation/ShazamKit/SHError/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "ShazamKit"
    ],
    "preciseIdentifier" : "c:@E@SHErrorCode"
  },
  "title" : "SHError.Code"
}
-->

# SHError.Code

Codes for the errors that Shazam produces.

```
enum Code
```

## Topics

### Matching errors

[`case matchAttemptFailed`](/documentation/ShazamKit/SHError/Code/matchAttemptFailed)

The error code to indicate when a Shazam Music catalog server issue prevents finding a match.

### Signature errors

[`case signatureInvalid`](/documentation/ShazamKit/SHError/Code/signatureInvalid)

The error code to indicate that the system is unable to generate a signature from the audio.

[`case signatureDurationInvalid`](/documentation/ShazamKit/SHError/Code/signatureDurationInvalid)

The error code to indicate that the length of the generated signature is too long or too short to make a match in the catalog.

### Audio format errors

[`case invalidAudioFormat`](/documentation/ShazamKit/SHError/Code/invalidAudioFormat)

The error code to indicate an unsupported audio format.

[`case audioDiscontinuity`](/documentation/ShazamKit/SHError/Code/audioDiscontinuity)

The error code to indicate the use of noncontiguous audio to request a match.

### Catalog errors

[`case customCatalogInvalidURL`](/documentation/ShazamKit/SHError/Code/customCatalogInvalidURL)

The error code to indicate that the format for the custom catalog URL is invalid.

[`case customCatalogInvalid`](/documentation/ShazamKit/SHError/Code/customCatalogInvalid)

The error code to indicate when the custom catalog fails to load due to an invalid format.

### Library sync errors

[`case mediaItemFetchFailed`](/documentation/ShazamKit/SHError/Code/mediaItemFetchFailed)

The error code to indicate when the system fails to fetch one or more media items.

[`case mediaLibrarySyncFailed`](/documentation/ShazamKit/SHError/Code/mediaLibrarySyncFailed)

The error code to indicate when the system fails to add one or more media items to the user’s Shazam library.

### Framework errors

[`case internalError`](/documentation/ShazamKit/SHError/Code/internalError)

The error code to indicate a generic framework error.

### Querying the error domain

[`let SHErrorDomain: String`](/documentation/ShazamKit/SHErrorDomain)

The error domain for specific errors for ShazamKit.

### Initializers

[`init?(rawValue: Int)`](/documentation/ShazamKit/SHError/Code/init(rawValue:))

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)