mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-14 21:30:19 +00:00
7 lines
218 B
JavaScript
7 lines
218 B
JavaScript
|
module.exports = function (response) {
|
||
|
if (response.ok) { // res.status >= 200 && res.status < 300
|
||
|
return response;
|
||
|
} else {
|
||
|
throw new Error(response.status + " " + response.statusText);
|
||
|
}
|
||
|
}
|