detect error response