so_dependencies: properly handle errors

Related to tsuru/tsuru#442 and tsuru/tsuru#701.