Revision 9322
Added by Jing Tao about 9 years ago
src/edu/ucsb/nceas/metacat/dataone/MNodeService.java | ||
---|---|---|
1422 | 1422 |
throw sf; |
1423 | 1423 |
} |
1424 | 1424 |
|
1425 |
if(currentLocalSysMeta == null) { |
|
1426 |
throw new InvalidRequest("1334", "We can't find the system metadata in the node for the id "+pid.getValue()); |
|
1427 |
} |
|
1425 | 1428 |
if (currentLocalSysMeta.getSerialVersion().longValue() < serialVersion ) { |
1426 | 1429 |
try { |
1427 | 1430 |
newSysMeta = cn.getSystemMetadata(null, pid); |
... | ... | |
1431 | 1434 |
"for pid " + pid.getValue() +", the CN reports it is not found." + |
1432 | 1435 |
" The error message was: " + e.getMessage(); |
1433 | 1436 |
logMetacat.error(msg); |
1434 |
ServiceFailure sf = new ServiceFailure("1333", msg); |
|
1437 |
//ServiceFailure sf = new ServiceFailure("1333", msg); |
|
1438 |
InvalidRequest sf = new InvalidRequest("1334", msg); |
|
1435 | 1439 |
sf.initCause(e); |
1436 | 1440 |
throw sf; |
1437 | 1441 |
} |
Also available in: Unified diff
Add the code to check if we can't get the current system metadata from the node in the mn.systemMetadataChanged method.
If we can't find it, an InvalidRequest will be thrown.