fixed error handling

fixes #544 
@dknochen Why is edinet gone?