---
title: BGTaskScheduler.Error
framework: backgroundtasks
role: symbol
role_heading: Structure
path: backgroundtasks/bgtaskscheduler/error
---

# BGTaskScheduler.Error

The Errors for the BGTaskSchedulerError domain.

## Declaration

```swift
struct Error
```

## Topics

### Getting the error codes

- [BGTaskScheduler.Error.Code](backgroundtasks/bgtaskscheduler/error/code.md)
- [notPermitted](backgroundtasks/bgtaskscheduler/error/notpermitted.md)
- [tooManyPendingTaskRequests](backgroundtasks/bgtaskscheduler/error/toomanypendingtaskrequests.md)
- [unavailable](backgroundtasks/bgtaskscheduler/error/unavailable.md)

### Getting the error domain

- [errorDomain](backgroundtasks/bgtaskscheduler/error/errordomain.md)

### Type Properties

- [immediateRunIneligible](backgroundtasks/bgtaskscheduler/error/immediaterunineligible.md)

## Relationships

### Conforms To

- [CustomNSError](foundation/customnserror.md)
- [Equatable](swift/equatable.md)
- [Error](swift/error.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Handling errors

- [BGTaskScheduler.Error.Code](backgroundtasks/bgtaskscheduler/error/code.md)
- [errorDomain](backgroundtasks/bgtaskscheduler/errordomain.md)
