testing
This commit is contained in:
parent
413b133a1f
commit
5d8b102422
2 changed files with 12 additions and 8 deletions
|
|
@ -80,13 +80,13 @@ export class HttpClient {
|
|||
const controller = new AbortController();
|
||||
const startTime = Date.now();
|
||||
let timeoutId: NodeJS.Timeout | undefined;
|
||||
|
||||
|
||||
// Set up timeout
|
||||
// Create a timeout promise that will reject
|
||||
const timeoutPromise = new Promise<never>((_, reject) => {
|
||||
timeoutId = setTimeout(() => {
|
||||
const elapsed = Date.now() - startTime;
|
||||
this.logger?.warn('Request timeout triggered', {
|
||||
this.logger?.debug('Request timeout triggered', {
|
||||
url: config.url,
|
||||
method: config.method,
|
||||
timeout,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue