Blame view
lib/hit/axios-error-is-safe.js
375 Bytes
8c258ccd9
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
const safeErrorCodes = [ 'EHOSTUNREACH', 'ENOTFOUND', 'ECONNREFUSED', 'ETIMEDOUT', // timeout on connecting // Berikut adalah error code yang tidak aman untuk dianggap gagal // terjadi karena timeout setelah konek (akibat pengaturan timeout pada request axios) // 'ECONNABORTED', ]; module.exports = (e) => safeErrorCodes.indexOf(e.code) >= 0; |