better handle of required errors