Is there a need for "else" here? You seem to expect that the jwt will contain a real value, as you are throwing exception above it if you cannot read the token. Any need of logging?