Added ability to return custom request
Refactored logic: error handling moved to mocks