We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afccf0c commit e85f406Copy full SHA for e85f406
src/clients/local/index.ts
@@ -79,15 +79,12 @@ export class LocalApiClient {
79
>
80
): Promise<StandardAxiosResponse<TSchema>> {
81
const endpoint = LOCAL_ENDPOINTS.find(e => e.url === url);
82
- if (!endpoint) {
83
- throw new Error(`Unknown endpoint: ${url}`);
84
- }
85
86
const config = args[0];
87
return this.axios({
88
headers: this.getHeaders(),
89
- baseURL: this.getServerUrl(),
90
- url: buildUrl(endpoint.url, { ...config?.path }),
+ ...(endpoint ? { baseURL: this.getServerUrl() } : {}),
+ url: buildUrl(url, { ...config?.path }),
91
...config,
92
});
93
}
0 commit comments