Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Errors

A hub answers a bad request with an HTTP status and a JSON body:

{ "code": "invalid_announce", "message": "services[0].endpoint must use a loopback host" }

The libraries raise the same codes (FunlinkError, funlink::Error, FunlinkException).

CodeStatusCauseFix
invalid_announce400The record breaks a rule; the message names the field.Check the record limits. Common: endpoint not on 127.0.0.1, wrong scheme for the protocol, id with spaces, unregistered protocol name without x-.
forbidden403The Host or Origin header was refused.Send to 127.0.0.1, not a LAN address. Web pages are refused by hubs that do not accept browsers.
not_found404Unknown path or version.Use /funlink/v1/announce and /funlink/v1/bye.
too_large413Body over 96 KiB.Shrink the icon (≤ 64 KiB) or ext.
rate_limited429Same id less than 200 ms apart, or more than 64 apps.Announce every 5 s; the libraries pace themselves.
no_port–Library only: all ports 37420–37429 are taken, so a hub cannot start.Close another hub, or set FUNLINK_PORT.

Connection refused on a port just means no hub listens there; ignore it.