Revision 9271
Added by ben leinfelder over 9 years ago
src/edu/ucsb/nceas/metacat/restservice/v1/CNResourceHandler.java | ||
---|---|---|
1583 | 1583 |
logMetacat.debug("Parsing ReplicaStatus from the mime multipart entity"); |
1584 | 1584 |
|
1585 | 1585 |
try { |
1586 |
// parse the policy
|
|
1586 |
// parse the failure, if we have it
|
|
1587 | 1587 |
Map<String, File> files = collectMultipartFiles(); |
1588 |
failure = ExceptionHandler.deserializeXml(new FileInputStream(files.get("failure")), |
|
1589 |
"Replication failed for an unknown reason."); |
|
1588 |
if (files.containsKey("failure")) { |
|
1589 |
failure = ExceptionHandler.deserializeXml(new FileInputStream(files.get("failure")), |
|
1590 |
"Replication failed for an unknown reason."); |
|
1591 |
} |
|
1590 | 1592 |
|
1591 | 1593 |
} catch (Exception e2) { |
1592 | 1594 |
throw new ServiceFailure("4700", "Couldn't resolve the multipart request: " + |
Also available in: Unified diff
merge from V2 impl: check for optional "failure" param instead of throwing exception when it is missing (often is). https://redmine.dataone.org/issues/7283