Revision 9269
Added by ben leinfelder over 9 years ago
src/edu/ucsb/nceas/metacat/restservice/v2/CNResourceHandler.java | ||
---|---|---|
1672 | 1672 |
logMetacat.debug("Parsing ReplicaStatus from the mime multipart entity"); |
1673 | 1673 |
|
1674 | 1674 |
try { |
1675 |
// parse the policy
|
|
1675 |
// parse the failure, if we have it
|
|
1676 | 1676 |
Map<String, File> files = collectMultipartFiles(); |
1677 |
failure = ExceptionHandler.deserializeXml(new FileInputStream(files.get("failure")), |
|
1678 |
"Replication failed for an unknown reason."); |
|
1677 |
if (files.containsKey("failure")) { |
|
1678 |
failure = ExceptionHandler.deserializeXml(new FileInputStream(files.get("failure")), |
|
1679 |
"Replication failed for an unknown reason."); |
|
1680 |
} |
|
1679 | 1681 |
|
1680 | 1682 |
} catch (Exception e2) { |
1681 | 1683 |
throw new ServiceFailure("4700", "Couldn't resolve the multipart request: " + |
Also available in: Unified diff
check for optional "failure" param instead of throwing exception when it is missing (often is). https://redmine.dataone.org/issues/7283