DS-3511: Add context.complete() to updateBitstreamData and deleteBitstreamPolicy to prevent HTTP 500 response on REST updates

This commit is contained in:
Miika Nurminen
2017-09-19 14:04:51 +03:00
parent 0fb23c677e
commit 22bb9a5751

View File

@@ -550,7 +550,7 @@ public class BitstreamResource extends Resource {
UUID newBitstreamId = bitstreamStorageService.store(context, dspaceBitstream, is);
log.trace("Bitstream data stored: " + newBitstreamId);
context.complete();
} catch (SQLException e) {
processException("Could not update bitstream(id=" + bitstreamId + ") data, SQLException. Message: " + e,
context);
@@ -690,6 +690,7 @@ public class BitstreamResource extends Resource {
log.trace("Policy for bitstream(id=" + bitstreamId + ") was successfully removed.");
}
context.complete();
} catch (SQLException e) {
processException(
"Someting went wrong while deleting policy(id=" + policyId + ") to bitstream(id=" + bitstreamId