---
name: "up:request:offline"
area: "API"
kind: "DOM event"
parent: "up.network module"
url: "https://unpoly.com/api/up:request:offline"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.network module](https://unpoly.com/api/up.network.md)</nav>

# up:request:offline

This event is [emitted](https://unpoly.com/api/up.emit.md) when a [request](https://unpoly.com/api/up.request.md) encounters a fatal error, like a [timeout](https://unpoly.com/api/up.network.config.md#config.timeout) or loss of network connectivity.

> <nav aria-label="Guides">
>
> - [Learn: Handling network issues](https://unpoly.com/learn/network-issues.md#disconnects)
>
> </nav>
>
> #### Note
>
> This event will _not_ be emitted when the server produces an error message with an HTTP status like `500`. When the server can produce any response, [`up:request:loaded`](https://unpoly.com/api/up:request:loaded.md) is emitted instead.

The event is emitted on the layer that caused the request.

To effectively [handle disconnects while rendering](https://unpoly.com/learn/network-issues.md#disconnects), use the [`up:fragment:offline`](https://unpoly.com/api/up:fragment:offline.md) event instead.

---

## Event properties {#properties}

### event.request {#event.request}

(required)

The failed request.

Type: [up.Request](https://unpoly.com/api/up.Request.md)

### [event.layer] {#event.layer}

(optional)

The [layer](https://unpoly.com/api/up.layer.md) this request is associated with.

If this request was intended to update an existing fragment, this is that fragment's layer.

If this request was intended to [open an overlay](https://unpoly.com/learn/opening-overlays.md), the associated layer is the future overlay's parent layer.

Type: [up.Layer](https://unpoly.com/api/up.Layer.md)

### [event.origin] {#event.origin}

(optional)

The link or form element that caused the request.

Type: [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element)

