<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: 18.4.0 -",
    "macOS: 15.4.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKWebExtensionContext/Error",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "s:SC26WKWebExtensionContextErrorLeV"
  },
  "title" : "WKWebExtensionContext.Error"
}
-->

# WKWebExtensionContext.Error

Constants used to indicate errors in the web extension context domain.

```
struct Error
```

## Topics

### Type Properties

[`static var alreadyLoaded: WKWebExtensionContext.Error.Code`](/documentation/WebKit/WKWebExtensionContext/Error/alreadyLoaded)

Indicates that the context is already loaded by a [`WKWebExtensionController`](/documentation/WebKit/WKWebExtensionController).

[`static var backgroundContentFailedToLoad: WKWebExtensionContext.Error.Code`](/documentation/WebKit/WKWebExtensionContext/Error/backgroundContentFailedToLoad)

Indicates that an error occurred loading the background content.

[`static var baseURLAlreadyInUse: WKWebExtensionContext.Error.Code`](/documentation/WebKit/WKWebExtensionContext/Error/baseURLAlreadyInUse)

Indicates that another context is already using the specified base URL.

[`static var errorDomain: String`](/documentation/WebKit/WKWebExtensionContext/Error/errorDomain)

A string that identifies the error domain.

[`static var noBackgroundContent: WKWebExtensionContext.Error.Code`](/documentation/WebKit/WKWebExtensionContext/Error/noBackgroundContent)

Indicates that the extension does not have background content.

[`static var notLoaded: WKWebExtensionContext.Error.Code`](/documentation/WebKit/WKWebExtensionContext/Error/notLoaded)

Indicates that the context is not loaded by a [`WKWebExtensionController`](/documentation/WebKit/WKWebExtensionController).

[`static var unknown: WKWebExtensionContext.Error.Code`](/documentation/WebKit/WKWebExtensionContext/Error/unknown)

Indicates that an unknown error occurred.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)