refactor: make error handling client-aware
refactor: wrap requests into lambdas