suppress unnecessary stacktrace when http status code is redirect relate...

...d.

Close #3018