chore(xhr): check state before use accessors
refactor: handle response