Tunnel Error Reference

Every error you can hit on a PreviewBox tunnel URL, with a stable code you can search for. Each entry tells you exactly what happened, how to fix it if you run the tunnel, and the one line to relay if you are just visiting.

12 of 12 errors

PB-1404HTTP 404Tunnel Not Found

No PreviewBox tunnel exists at this address. The tunnel may have been deleted, renamed, or the URL may contain a typo.

If you run the tunnel
  • Share the exact URL PreviewBox printed after starting — not the port number.
  • If you deleted or renamed the tunnel, create a new one and update the link you sent out.
Just visiting? Relay this to the owner

“I opened the PreviewBox tunnel and got "Tunnel Not Found" (PB-1404).”

PB-1405HTTP 400Invalid Address

The subdomain itself is malformed. Tunnel names are lowercase letters, numbers and hyphens, like my-app.previewbox.dev.

If you run the tunnel
  • Hand out the exact URL PreviewBox printed, not a hand-typed address.
  • Custom subdomains must be alphanumeric plus hyphens — no spaces or special characters.
Just visiting? Relay this to the owner

“I tried to open the PreviewBox tunnel and it said the address was invalid (PB-1405).”

PB-1502HTTP 502Tunnel Offline

This address exists but is not currently active. The CLI either was not started or has disconnected.

If you run the tunnel
  • Start it with: prevbox serve http <port> --subdomain <name>
  • A long-running laptop or session may have gone to sleep — restart the tunnel.
Just visiting? Relay this to the owner

“The PreviewBox tunnel went offline and the site won’t load (PB-1502). Can you restart it?”

PB-1503HTTP 403Access Denied

The tunnel has an IP allowlist and the visitor’s address is not on it. Only approved IPs can open this page.

If you run the tunnel
  • Add the visitor’s IP address to the tunnel’s allowlist, or disable the allowlist temporarily.
  • Find it under Dashboard → the tunnel → IP restrictions.
Just visiting? Relay this to the owner

“I got "Access Denied" (PB-1503) on the PreviewBox tunnel — my IP may need to be added to the allowlist.”

PB-2502HTTP 502Server Unreachable

The tunnel is connected, but the local app it points to refused the connection. The app is not running, is on another port, or crashed.

If you run the tunnel
  • Confirm your app is actually running (check your terminal).
  • Make sure it is listening on the exact port the tunnel was started with.
  • A port or socket conflict can cause this — change the app port and restart both.
Just visiting? Relay this to the owner

“The PreviewBox tunnel showed "Server Unreachable" (PB-2502) — the app behind the tunnel isn't running.”

PB-2503HTTP 502Server Not Responding

The tunnel is connected, but the local app did not answer in time. The app may be hung, slow, or overwhelmed.

If you run the tunnel
  • Your app may be hung or blocked — restart it and the tunnel.
  • Large or slow responses can exceed the tunnel’s timeout. Check the app’s response time.
Just visiting? Relay this to the owner

“The PreviewBox tunnel timed out loading (PB-2503) — the app behind it may have hung. Mind restarting it?”

PB-1400HTTP 400Bad Request

PreviewBox received a request it could not parse. Usually a broken or hand-built link, not your setup.

If you run the tunnel
  • Check the exact URL that failed — a hand-written link may be malformed.
  • If an app generates this link, it may be building URLs incorrectly.
Just visiting? Relay this to the owner

“I hit "Bad Request" (PB-1400) on the PreviewBox tunnel — may be a broken link.”

PB-2413HTTP 413Payload Too Large

The request exceeded PreviewBox’s 10MB body limit. Large uploads and multi-megabyte payloads will fail.

If you run the tunnel
  • The 10MB limit is fixed — large uploads will always fail.
  • Consider chunked uploads or a different endpoint for big files.
Just visiting? Relay this to the owner

“The PreviewBox tunnel rejected a request as too large (PB-2413) — the payload is over 10MB.”

PB-2501HTTP 502Tunnel Error

The tunnel hit an unexpected error while forwarding the request. Usually transient — a brief network hiccup between the CLI and PreviewBox.

If you run the tunnel
  • This can be a brief network hiccup between you and PreviewBox — try again.
  • Restart the tunnel if it recurs, and check the prevbox logs for errors.
Just visiting? Relay this to the owner

“I hit a generic "Tunnel Error" (PB-2501) on the PreviewBox link — a refresh may fix it.”

PB-2604HTTP 429Too Many Requests

PreviewBox rate limited the tunnel because there were too many requests or connection attempts in a short window.

If you run the tunnel
  • New tunnel connections are rate limited per minute by default.
  • The per-tunnel rate limit is configurable in the dashboard.
Just visiting? Relay this to the owner

“The PreviewBox tunnel said "Too Many Requests" (PB-2604) — I’ll retry in a moment.”

PB-2608HTTP 504Request Timeout

PreviewBox gave up waiting for the tunnel to respond. The app took too long to reply within the tunnel’s request timeout.

If you run the tunnel
  • Your app took too long to respond to the tunnel.
  • Tunnels have a hard request timeout — slow endpoints will fail it.
Just visiting? Relay this to the owner

“The PreviewBox tunnel timed out waiting for the app (PB-2608) and didn't load.”

PB-2609HTTP 502Connection Dropped

PreviewBox’s connection to the tunnel was lost mid-request. The CLI’s WebSocket to PreviewBox disconnected.

If you run the tunnel
  • Your tunnel’s WebSocket to PreviewBox disconnected during a request.
  • Restart the tunnel to re-establish the connection cleanly.
Just visiting? Relay this to the owner

“The PreviewBox tunnel dropped the connection mid-load (PB-2609) — a refresh may fix it.”

The code for any error also appears in the X-Error-Code response header, so scripts and integrations can match it programmatically. Still stuck? See HTTP Tunnels, TCP Tunnels, or the CLI reference.