check error before status code..