---
title: NextRequestError
summary: Errors that can occur when asking for or resolving a RequestPromise.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/http/serve/enum.NextRequestError/
---

**Kind:** Enum  
**Module:** [serve](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/http/serve/)  
**Package:** fastly 0.13.1  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/http/serve.rs#484

```rust
pub enum NextRequestError {
    Timeout(RequestPromise),
    OutstandingResponse,
    EndOfSession,
    Other(FastlyStatus),
}
```

Errors that can occur when asking for or resolving a RequestPromise.

## Variants

### Timeout

- `0`: `RequestPromise`

No request was available, but one may become available in the future.

Note that the RequestPromise is still valid, and may provide a request in the
future. If you no longer intend to accept an additional request, drop the RequestPromise
promptly after receiving the timeout.

### OutstandingResponse

No request is available because the response for the current request has not completed.

The response for the current request must be completed before a promise can be fulfilled.

### EndOfSession

No more requests will be delivered to this sandbox.

This can occur if the RequestPromise has exceeded its overall timeout or if another limit
has been reached.

### Other

- `0`: `fastly_shared::FastlyStatus`

Any other error.

## Trait implementations

### impl Debug for NextRequestError

#### fmt

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/http/serve.rs#483

```rust
fn fmt(&self, f: &mut Formatter<'_>) -> Result
```

**Parameters**

- `self`: `&Self`
- `f`: `&mut $crate::fmt::Formatter`

**Returns**

`$crate::fmt::Result`

### impl Display for NextRequestError

#### fmt

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/http/serve.rs#483

```rust
fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result
```

**Parameters**

- `self`: `&Self`
- `__formatter`: `&mut ::core::fmt::Formatter`

**Returns**

`::core::fmt::Result`

## Auto trait implementations

- `Freeze`
- `RefUnwindSafe`
- `Send`
- `Sync`
- `Unpin`
- `UnsafeUnpin`
- `UnwindSafe`

## Blanket implementations

- `Any`
- `Borrow<T>`
- `BorrowMut<T>`
- `Downcast`
- `DowncastSync`
- `ErasedDestructor`
- `From<T>`
- `Into<U>`
- `IntoEither`
- `Same`
- `ToString`
- `TryFrom<U>`
- `TryInto<U>`
