[packagedb-cli/pkgdb_admin] Raise an exception with the error message only when there is one