Skip to content

Commit e85f406

Browse files
committed
fix: local client endpoint detection
1 parent afccf0c commit e85f406

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/clients/local/index.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,12 @@ export class LocalApiClient {
7979
>
8080
): Promise<StandardAxiosResponse<TSchema>> {
8181
const endpoint = LOCAL_ENDPOINTS.find(e => e.url === url);
82-
if (!endpoint) {
83-
throw new Error(`Unknown endpoint: ${url}`);
84-
}
8582

8683
const config = args[0];
8784
return this.axios({
8885
headers: this.getHeaders(),
89-
baseURL: this.getServerUrl(),
90-
url: buildUrl(endpoint.url, { ...config?.path }),
86+
...(endpoint ? { baseURL: this.getServerUrl() } : {}),
87+
url: buildUrl(url, { ...config?.path }),
9188
...config,
9289
});
9390
}

0 commit comments

Comments
 (0)