title: express js internal server error 500 with no errors in code
body: <p>my express js routes are giving me error 500 internal server error and I tried to console log the variables and nothing shows up</p>
  <p>here are the express routes:</p>
  <pre><code>submitStar() {
          this.app.post(&quot;/submitstar&quot;, async (req, res) =&gt; {
              if(req.body.address &amp;&amp; req.body.message &amp;&amp; req.body.signature &amp;&amp; req.body.star) {
                  const address = req.body.address;
                  const message = req.body.message;
                  const signature = req.body.signature;
                  const star = req.body.star;
                  try {
                      let block = await this.blockchain.submitStar(address, message, signature, star);
                      if(block){
                          return res.status(200).json(block);
                      } else {
                          return res.status(500).send(&quot;An error happened!&quot;);
                      }
                  } catch (error) {
                      return res.status(500).send(error);
                  }
              } else {
                  return res.status(500).send(&quot;Check the Body Parameter!&quot;);
              }
          });
      }
  </code></pre>
  <p>I keep getting the message &quot;Check the Body Parameter!&quot; in Postman while the message is actually correct</p>
  <p><a href="https://i.stack.imgur.com/BUsT8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BUsT8.png" alt="enter image description here" /></a></p>
  <p>the app.js:</p>
  <pre><code>const express = require(&quot;express&quot;);
  const morgan = require(&quot;morgan&quot;);
  const bodyParser = require(&quot;body-parser&quot;);
  
     
  /**
   * Require the Blockchain class. This allow us to have only one instance of the class.
   */
  const BlockChain = require('./src/blockchain.js');
  
  class ApplicationServer {
  
      constructor() {
          //Express application object
          this.app = express();
          //Blockchain class object
          this.blockchain = new BlockChain.Blockchain();
          //Method that initialized the express framework.
          this.initExpress();
          //Method that initialized middleware modules
          this.initExpressMiddleWare();
          //Method that initialized the controllers where you defined the endpoints
          this.initControllers();
          //Method that run the express application.
          this.start();
      }
  
      initExpress() {
          this.app.set(&quot;port&quot;, 8000);
      }
  
      initExpressMiddleWare() {
          this.app.use(morgan(&quot;dev&quot;));
          this.app.use(bodyParser.urlencoded({extended:true}));
          this.app.use(bodyParser.json());
      }
  
      initControllers() {
          require(&quot;./BlockchainController.js&quot;)(this.app, this.blockchain);
      }
  
      start() {
          let self = this;
          this.app.listen(this.app.get(&quot;port&quot;), () =&gt; {
              console.log(`Server Listening for port: ${self.app.get(&quot;port&quot;)}`);
          });
      }
  
  }
  
  new ApplicationServer();
  </code></pre>
  <p>what could be wrong with server?</p>