any-of: now throws an error when no wrapped plugins configured (ref. #21)

merge-requests/6/merge
Michał 'rysiek' Woźniak 2021-11-11 10:05:48 +00:00
rodzic 890708ce46
commit a797cd697a
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -29,6 +29,11 @@
// merge the defaults with settings from LibResilientConfig
let config = {...defaultConfig, ...init}
// reality check: if no wrapped plugin configured, complain
if (config.uses.length < 1) {
throw new Error("No wrapped plugins configured!")
}
/**
* getting content using regular HTTP(S) fetch()
*/