LearningRegistry/LearningRegistry — Issue #128: harvest/getrecord returns 500 error code when resource not found
Author: joehobson
Created: 2011-11-10 22:53:20+00:00
State: open

When implementing paradata viewing on resource records in Brokers of Expertise, we noticed our logs were filling up with errors whenever a resource was viewed that didn't have any paradata in the system. We fixed it by suppressing 500 errors returned by the node. So for a call to harvest/getrecord that returns one or more records you get the usual HTTP header 200 status code. If no records are returned you get a 500.

Example: http://lrtest01.learningregistry.org/harvest/getrecord?request_ID=http://www.xyz.com

You can use a web-based sniffer to see returned headers: http://web-sniffer.net/

Then again, i'm not entirely sure what's going on here because when i try to view the status codes with curl it looks like a 200 is returned.