title: Two rejects in One Promise
body: <p>I am new to JavaScript. I don't know where I can use two rejects inside one promise; can anyone tell me that it's bad practice to have two rejects in one promise? If yes, what will be the optional solution?</p>
  
  <p>Here is my code</p>
  
  <pre><code>async handler(ctx) {
                  /*
                   * sheet_to_json method converts excel file to JSON format
                  */
                  let { s3Url, header } = ctx.params;
                  return new Promise((resolve, reject) =&gt; {
                      request({method: 'GET',  uri: s3Url,encoding: null}, async function(err, res, data) {
                          if(err || res.statusCode !== 200) reject(err);
                          try{
                              const workbook = XLSX.read(data, {type:'buffer'});
                              const sheet_name_list = workbook.SheetNames;
                              let result = await XLSX.utils.sheet_to_json(workbook.Sheets[sheet_name_list[0]], {header});
                              resolve(result);
                          }
                          catch(error){
                              reject("Invalid File Cointaint");
                          }       
                      })
                  });
              }
  </code></pre>