Add metadata timeout (#287)

* Add metadata timeout

* Fix lint
This commit is contained in:
DecDuck
2025-11-20 00:17:58 +00:00
committed by GitHub
parent 8f41024be2
commit beb824c8d9
9 changed files with 2790 additions and 784 deletions

View File

@ -82,6 +82,10 @@ export class MetadataHandler {
// TODO: fix eslint error
// eslint-disable-next-line no-async-promise-executor
>(async (resolve, reject) => {
setTimeout(
() => reject(new Error("Timeout while fetching results")),
systemConfig.getMetadataTimeout(),
);
try {
const results = await provider.search(query);
const mappedResults: InternalGameMetadataResult[] = results.map(