New release #210

Merged
b merged 28 commits from staging into main 2024-09-19 08:23:14 +00:00
2 changed files with 8 additions and 1 deletions
Showing only changes of commit 9c545a477c - Show all commits

View File

@ -0,0 +1,6 @@
export class TimeoutError extends Error {
constructor() {
super('Timeout')
this.name = this.constructor.name
}
}

View File

@ -1,3 +1,4 @@
import { TimeoutError } from '../types/errors/TimeoutError.ts'
import { CurrentUserFile } from '../types/file.ts' import { CurrentUserFile } from '../types/file.ts'
import { SigitFile } from './file.ts' import { SigitFile } from './file.ts'
@ -63,7 +64,7 @@ export const timeout = (ms: number = 60000) => {
// Set a timeout using setTimeout // Set a timeout using setTimeout
setTimeout(() => { setTimeout(() => {
// Reject the promise with an Error indicating a timeout // Reject the promise with an Error indicating a timeout
reject(new Error('Timeout')) reject(new TimeoutError())
}, ms) // Timeout duration in milliseconds }, ms) // Timeout duration in milliseconds
}) })
} }