add abort when query linkedin error
refactor code