Bug #3246
Metacat returns 500 instead of 404 in some cases
0%
Description
For example:
https://knb.ecoinformatics.org/knb/d1/mn/v1/bogus
should return a 404 NotFound error, but instead returns a 500, ServiceFailure.
This is not an urgent issue, but should probably be cleaned up.
History
#1 Updated by Matthew Jones over 12 years ago
In exploring this error, I see that Metacat's service dispatching is somewhat imprecise, and should be fixed to be sure that the exact rest endpoints are used to invoke services. For example:
https://knb.ecoinformatics.org/knb/d1/mn/v1/node
https://knb.ecoinformatics.org/knb/d1/mn/v1/nodexxx
https://knb.ecoinformatics.org/knb/d1/mn/v1/nodeyyy
All of these produce the nodelist, but only the first should -- the others should be 404 errors.
Similarly, in the following two calls:
https://knb.ecoinformatics.org/knb/d1/mn/v1/object?count=30
https://knb.ecoinformatics.org/knb/d1/mn/v1/objectxxx?count=30
THe first correctly returns the object list, but the second returns a 404 with the message "No system metadata could be found for given PID: xxx". Instead, that should have been rejected with a 404 that says the service "objectxxx" was not found.
Overall, it seems that the precision of method dispatch and url parsing in Metacat should be reviewed.
#2 Updated by Jing Tao about 10 years ago
- Due date set to 2014-10-02
- Target version set to Release Backlog
- translation missing: en.field_remaining_hours set to 0.0