title: How should I handle exceptions raised in @jwt_required decorator? (in flask-jwt-extended)
body: <p>I have a function with @jwt_required decorator.</p>
  
  <pre><code>class Test(Resource):
      @jwt_required
      def get(self):
          return {"test": "ok" }
  </code></pre>
  
  <p>Which works fine when the correct HTTP header is set, i.e.</p>
  
  <p><code>Authentication: Bearer [TOKEN]</code></p>
  
  <p>but when the token is invalid/wrong or messed with, a jwt.exceptions.DecodeError is raised:</p>
  
  <pre><code>File "env/lib/python3.6/site-packages/flask_restplus/resource.py", line 44, in dispatch_request
      resp = meth(*args, **kwargs)
    File "env/lib/python3.6/site-packages/flask_jwt_extended/view_decorators.py", line 103, in wrapper
      verify_jwt_in_request()
    File "env/lib/python3.6/site-packages/flask_jwt_extended/view_decorators.py", line 32, in verify_jwt_in_request
      jwt_data = _decode_jwt_from_request(request_type='access')
    File "env/lib/python3.6/site-packages/flask_jwt_extended/view_decorators.py", line 267, in _decode_jwt_from_request
      decoded_token = decode_token(encoded_token, csrf_token)
    File "env/lib/python3.6/site-packages/flask_jwt_extended/utils.py", line 80, in decode_token
      encoded_token, verify=False, algorithms=config.algorithm
    File "env/lib/python3.6/site-packages/jwt/api_jwt.py", line 84, in decode
      payload, _, _, _ = self._load(jwt)
    File "env/lib/python3.6/site-packages/jwt/api_jws.py", line 183, in _load
      raise DecodeError('Not enough segments')
  jwt.exceptions.DecodeError: Not enough segments
  </code></pre>
  
  <p>I cannot rely on clients always using correct tokens all the time.
  And I cannot catch the exception because it is raised in the decorator rather than my own function. So the result is a http 500 error. How should I handle the exception more gracefully?</p>