return error instead of custom object

Summary: return error instead of custom object

Test Plan: none

Reviewers: andybons, roly

Reviewed By: andybons

Differential Revision: https://phabricator.poptip.com/D1465