added handling error response