gracefully die in case of early API error
Reviewers: valerio.bozzolan
Differential Revision: https://gitpull.it/D20