Skip to content

Commit 96da7b9

Browse files
szymonlesiszmroz22
authored andcommitted
fix(transport): pass all options to bridgeApiCall (signal, timeout)
1 parent 556b412 commit 96da7b9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/transport/src/transports/bridge.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type R = Extract<
4444
type IncompleteRequestOptions = {
4545
params?: string;
4646
body?: any;
47-
timeout?: boolean;
47+
timeout?: number;
4848
signal?: AbortController['signal'];
4949
};
5050

@@ -171,7 +171,6 @@ export class BridgeTransport extends AbstractTransport {
171171

172172
const response = await this.post('/acquire', {
173173
params: `${input.path}/${previous}`,
174-
timeout: true,
175174
signal,
176175
});
177176

@@ -385,10 +384,8 @@ export class BridgeTransport extends AbstractTransport {
385384
endpoint: BridgeEndpoint,
386385
options: IncompleteRequestOptions,
387386
): AsyncResultWithTypedError<R, AnyError> {
388-
const { timeout, signal, ...restOptions } = options;
389-
390387
const response = await bridgeApiCall({
391-
...restOptions,
388+
...options,
392389
method: 'POST',
393390
url: `${this.url + endpoint}${options?.params ? `/${options.params}` : ''}`,
394391
skipContentTypeHeader: true,

0 commit comments

Comments
 (0)