Skip to main content
decodeAgentName(id): string
Recover the routing name an actor id was encoded from — the exact inverse of encodeAgentName. decodeAgentName(encodeAgentName(name)) is name, for every name encodeAgentName accepts. Use it to render an id back as something a person reads: a log line, an admin listing, a dashboard row.
It is strict on purpose: an id encodeAgentName could not have produced is refused rather than half-read. That is what makes it safe to point at an id of unknown provenance — an id from an older encoding, or one a caller hand-assembled, is reported instead of being passed off as a name it never was. Parameters Returns string The routing name it was built from. Throws TypeError when id is not something encodeAgentName could have produced: an empty id, a character outside the addressable set sitting unescaped, a . or .. (which the encoder always escapes), two escapes in a row, an unterminated escape, an escape that is not whole bytes of hex, or hex that is not valid UTF-8.