catch requests error
catch type error