better errors in the case of an application error