handle http errors
refactor
remove properties