title: URIError: Failed to decode param '/December%2015,%' in framework express
body: <p>Using express framework I did a middleware that handles a URI with a date as parameter.</p>
  
  <pre><code>app.get("/:date",function(req,res){
       var result;
       var myDate=req.params.date
  
         if(moment(myDate).isValid()){
               //some code here
        } 
  
          else {
                //some code here
              }
  
  
    }
  </code></pre>
  
  <p>and the http is for example:
      <a href="https://theweb.com/December%2015,%2020" rel="nofollow noreferrer">https://theweb.com/December%2015,%2020</a></p>
  
  <p>The middleware works well. But if the http finish in % as in
      <a href="https://theweb.com/December%2015,%" rel="nofollow noreferrer">https://theweb.com/December%2015,%</a> 
  it gives a error:</p>
  
  <pre><code>URIError: Failed to decode param '/December%2015,%' 
  </code></pre>
  
  <p>and what I would like is to convert that error in the display of a message as Bad Request.</p>