modified the if condition for HTTP Status codes, only 100-299 codes moved to success view other than that will move to error view.