node-client: connection ids containing / break getConnection, getToken, deleteConnection and patchConnection
Author: breken-aiCreated Sep 27, 2026Updated Sep 27, 2026
The server accepts / in connection ids (connectionIdSchema allows /), but @nangohq/node puts the raw id into the url path:
getConnectionDetails(used bygetConnection,getToken,getRawTokenResponse):`${this.serverUrl}/connections/${connectionId}`deleteConnection:`${this.serverUrl}/connections/${connectionId}?provider_config_key=...`patchConnection:`${this.serverUrl}/connections/${params.connectionId}?provider_config_key=...`
So nango.getConnection('github', 'acme/prod') requests /connections/acme/prod, which does not match /connections/:connectionId (404). Wrapping the id in encodeURIComponent sends /connections/acme%2Fprod, which Express decodes back to acme/prod.
Suggested fix (3 lines + 3 unit tests): https://github.com/breken-ai/nango/compare/master...fix/node-client-encode-connection-id
Source: NangoHQ/nango