title: Minio minio.error.SignatureDoesNotMatch thrown with try-except
body: <p>I am using the python package for the minio server. I have the following piece of code that is used for a login:</p>
  <pre class="lang-py prettyprint-override"><code>from minio.error import [...], SignatureDoesNotMatch, [...]
  
  def login(self):
      try: 
          self.user = Minio(MINIO_CONFIG['MINIO_ENDPOINT'], 
                                  access_key=self.username, 
                                  secret_key=self.password, 
                                  secure=MINIO_CONFIG['MINIO_SECURE'])
          return {&quot;msg&quot;:&quot;User is now logged in&quot;, &quot;status&quot;: &quot;OK&quot;}
       except SignatureDoesNotMatch as err: 
          return {&quot;msg&quot;: err.message, &quot;status&quot;:&quot;F&quot;}
       except ResponseError as err: 
          return {'msg': err.message, 'status': &quot;F&quot;}
       except InvalidAccessKeyId as err: 
          return {&quot;msg&quot;: err.message, &quot;status&quot;:&quot;F&quot;}
       except InvalidArgument as err: 
          return {&quot;msg&quot;: err.message, &quot;status&quot;:&quot;F&quot;}
       except InvalidArgumentError as err: 
          return {&quot;msg&quot;: err.message, &quot;status&quot;:&quot;F&quot;}
  </code></pre>
  <p>The issue I am facing is that even though I do have in the <code>try-except</code> the <code>SignatureDoesNotMatch</code> in case the credentials are not correct, it does not return me the msg it should but it throws an <code>minio.error.SignatureDoesNotMatch</code> instead. Why does that happen?</p>
  <p>The error I get:</p>
  <pre><code>minio.error.SignatureDoesNotMatch: SignatureDoesNotMatch: message: The request signature we calculated does not match the signature you provided.
  </code></pre>