catch(Exception e){
Trace.WriteLine("{Message}");
throw new Exception("{Message}", e);
}
instead of this use the following construct, which will pass your exception to higher level:
catch(Exception e){
Trace.WriteLine("{Message}");
throw;
}
catch(Exception e){
Trace.WriteLine("{Message}");
throw new Exception("{Message}", e);
}
catch(Exception e){
Trace.WriteLine("{Message}");
throw;
}
public AuthToken createAuthToken(HttpServletRequest request, HttpServletResponse response) throws UnauthorizedException{
...
//calling method from base class
return super.createAuthToken(request, response);
}