Shorten timeout and error message for remaining providers

This commit is contained in:
mikiher 2025-10-02 22:23:12 +03:00
parent 26f949b9ba
commit c6dabd2620
5 changed files with 12 additions and 12 deletions

View file

@ -1,7 +1,7 @@
const axios = require('axios').default
class OpenLibrary {
#responseTimeout = 30000
#responseTimeout = 10000
constructor() {
this.baseUrl = 'https://openlibrary.org'
@ -23,7 +23,7 @@ class OpenLibrary {
return res.data
})
.catch((error) => {
console.error('Failed', error)
console.error('Failed', error.message)
return null
})
}