diff --git a/src/communication/NetworkClient.ts b/src/communication/NetworkClient.ts index a88165c2..30837d4f 100644 --- a/src/communication/NetworkClient.ts +++ b/src/communication/NetworkClient.ts @@ -137,6 +137,11 @@ export default class NetworkClient { // Create retrying fetch function. const fetchWithRetries = retryingFetch(fetch); + // normalize the API endpoint - if you provided a path, you probably meant to include it + if (!apiEndpoint.endsWith('/')) { + apiEndpoint += '/'; + } + // Create the request function. this.request = (pathname, options) => { const url = new URL(pathname, apiEndpoint);