Better error handling in edge parsing