add sanity checks to domain_retriever, error handling to API_request