test if eror hanling works