Bug #3481
metacata D1NodeService.get() returning wrong exception
100%
Description
On a disk-full condition, cn-dev returned a NotFound exception, instead of ServiceFailure.
The object specified by jscientist.7.5could not be returned due to error: No space left on device
D1NodeService.get() converts every type of exception returned from MetacatHandler.read() to a NotFound, although this methods returns several types of exceptions. (throws ParseLSIDException, PropertyNotFoundException, McdbException, SQLException, ClassNotFoundException, IOException).
It seems that D1NodeService.get should map some of these to other DataONE exceptions.
History
#1 Updated by Dave Vieglais about 10 years ago
- Assignee changed from Ben Leinfelder to Jing Tao
#2 Updated by Dave Vieglais about 10 years ago
- Due date set to 2014-10-01
- Target version set to Release Backlog
- Start date set to 2014-10-01
#3 Updated by Jing Tao almost 10 years ago
- Status changed from New to Closed
- Target version changed from Release Backlog to CCI-2.0.0
- Due date changed from 2014-10-01 to 2014-12-13
In that the class, if the method handler.read(localId) threw an Exception class, the catch clause threw it to a NotFoundException. This worked for deleting, but not for the other situation.
So the exception handling was divided to parts:
1. For the McdbDocNotFoundException, the NotFound exception will be returned.
2. For the other Exception, a ServiceFailure exception will be returned.