---
title: error
summary: Error-handling utilities.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/error/
---

**Kind:** Module  
**Package:** fastly 0.13.1  
**Path:** `fastly::error`

Error-handling utilities.

## Structs

| Name | Summary |
| --- | --- |
| [BufferSizeError](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/error/struct.BufferSizeError/) | Insufficient buffer size error. |

## Enums

| Name | Summary |
| --- | --- |
| [BufferKind](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/error/enum.BufferKind/) | Enum describing what kind of buffer had insufficient size, in a [`BufferSizeError`](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/error/struct.BufferSizeError/). |
| [HandleError](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/error/enum.HandleError/) | `HandleError` is for errors that might arise when using the low level handle interface. For example trying to use a handle for an operation that has already been closed out. |
| [HandleKind](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/error/enum.HandleKind/) | An enum representing the type of handles that exist within the Compute platform that point to resources on the host side that users can access or manipulate. Typically this enum is used as part of [`HandleError`](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/error/enum.HandleError/) to let you know the type of handle involved when there is an error thrown while using the lower level handle interface |

## Macros

| Name | Summary |
| --- | --- |
| [anyhow](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/error/macro.anyhow/) | Construct an ad-hoc error from a string or existing non-`anyhow` error value. |
| [bail](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/error/macro.bail/) | Return early with an error. |
| [ensure](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/error/macro.ensure/) | Return early with an error if a condition is not satisfied. |
