API error condition fix