Modified methods to throw NOTFOUNDEXCEPTION instead RuntimeEror in neo4j_proxy (metadata_service)
@@ -410,7 +410,7 @@ class Neo4jProxy(BaseProxy):
'key': uri})
if not result.single():
- raise RuntimeError('Failed to update the resource {uri} description'.format(uri=uri))
+ raise NotFoundException('Failed to update the description as resource {uri} does not exist'.format(uri=uri))
# end neo4j transaction
tx.commit()
@@ -506,8 +506,8 @@ class Neo4jProxy(BaseProxy):
'column_key': column_uri})
if not result.single():
- raise RuntimeError('Failed to update the table {tbl} '
- 'column {col} description'.format(tbl=table_uri,
+ raise NotFoundException('Failed to update the table {tbl} '
+ 'column {col} description as either table or column does not exist'.format(tbl=table_uri,
col=column_uri))
# end neo4j transaction
