Need to catch all the error in the last outer catch block when an error occurs in the nested promise block.

```
let docs = {
  total: 0,
  total_downloaded: 0,
  plan_type: null,
};

Document.findAll({
  where: {
    report_request_id: req.params.requestId
  },
  attributes: ["id", "folder_name", "total_file"],
})
  .then(documents => {
    documents.forEach(document => {
        docs.total += 1;

        if (document.get("status") == 1) {
          docs.total_downloaded += 1;
        }
    });
  })
  .then(function() {
    Request.findOne({
      where: {
        id: req.params.requestId
      }
    })
      .then(request => {
        //Suppose I got error here
        docs.plan_type = request.plan_type;
      })
      .catch(err => {
        // Block A
        throw err;
      });
  })
  .then(function() {
    res.status(200).send(docs);
  })
  .catch(err => {
    // Block B
    res.status(400).send(err);
  });

```

As of now, I get success(200) every time even if I get an error in catch block A