<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKitTest",
  "identifier" : "/documentation/StoreKitTest/SKTestError",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "StoreKit Test"
    ],
    "preciseIdentifier" : "s:SC15SKTestErrorCodeLeV"
  },
  "title" : "SKTestError"
}
-->

# SKTestError

Information about an error that the testing environment returns.

```
struct SKTestError
```

## Topics

### Error Domain

[`static var errorDomain: String`](/documentation/StoreKitTest/SKTestError/errorDomain)

The domain of the error.

### Error Properties

### Error Codes

[`static var fileNotFound: SKTestError.Code`](/documentation/StoreKitTest/SKTestError/fileNotFound)

The initializer can’t find the file.

[`static var invalidAction: SKTestError.Code`](/documentation/StoreKitTest/SKTestError/invalidAction)

The action is invalid.

[`static var invalidProductIdentifier: SKTestError.Code`](/documentation/StoreKitTest/SKTestError/invalidProductIdentifier)

The product identifier is invalid.

[`static var invalidProductType: SKTestError.Code`](/documentation/StoreKitTest/SKTestError/invalidProductType)

The product type is invalid.

[`static var invalidURL: SKTestError.Code`](/documentation/StoreKitTest/SKTestError/invalidURL)

The URL is invalid.

[`static var noSubscriptionFound: SKTestError.Code`](/documentation/StoreKitTest/SKTestError/noSubscriptionFound)

The test environment didn’t find a subscription.

[`static var noTransactionFound: SKTestError.Code`](/documentation/StoreKitTest/SKTestError/noTransactionFound)

The test environment didn’t find a transaction.

[`static var serviceUnavailable: SKTestError.Code`](/documentation/StoreKitTest/SKTestError/serviceUnavailable)

The service isn’t available.

[`enum Code`](/documentation/StoreKitTest/SKTestError/Code)

Error codes in the testing environment.

### Error Comparisons and Hashing

## Relationships

### Conforms To

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

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

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

[`CustomNSError`](/documentation/Foundation/CustomNSError)

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

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

---

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)