Skip to content
Snippets Groups Projects
isVendorDown.js 549 B
Newer Older
  • Learn to ignore specific revisions
  • /*
    Error handling is based on API GRDF ADICT_Messages erreurs B2B_PROD_v1.4
    some code number can be duplicated depending on the http status
    isVendorDown only handle codes associated with http 200 response, all http error should be catched beforehand.
    */
    function isVendorDown(code) {
      switch (code) {
        case '2000100':
        case '1000009':
        case '1000010':
        case '1000011':
        case '1000006':
        case '1000016':
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
        case '1000002':
    
        case '1000000':
          return true
        default:
          return false
      }
    }
    
    module.exports = isVendorDown