Skip to content

Commit 4eea02e

Browse files
fix: convert override timeout to milliseconds
1 parent 78d91a1 commit 4eea02e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/apiClient.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ export default class APIClient {
156156
private async sendRequest(options: RequestOptionsParams): Promise<Response> {
157157
const req = this.newRequest(options);
158158
const controller: AbortController = new AbortController();
159-
const timeoutDuration = options.overrides?.timeout || this.timeout;
159+
const timeoutDuration = options.overrides?.timeout
160+
? options.overrides.timeout * 1000
161+
: this.timeout; // timeout is converted to milliseconds in client
160162
const timeout = setTimeout(() => {
161163
controller.abort();
162164
}, timeoutDuration);

0 commit comments

Comments
 (0)