{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/e26df88d621f60cc5487460580637f11?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"e26df88d621f60cc5487460580637f11","url":"https://api.github.com/users/joehobson","login":"joehobson","id":838671},"milestone":null,"labels":[],"assignee":null,"updated_at":"2011-11-11T00:58:08Z","comments":3,"closed_at":null,"url":"https://api.github.com/repos/LearningRegistry/LearningRegistry/issues/128","body":"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.\r\n\r\nExample: http://lrtest01.learningregistry.org/harvest/getrecord?request_ID=http://www.xyz.com\r\n\r\nYou can use a web-based sniffer to see returned headers: http://web-sniffer.net/\r\n\r\nThen 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. ","html_url":"https://github.com/LearningRegistry/LearningRegistry/issues/128","number":128,"title":"harvest/getrecord returns 500 error code when resource not found","id":2203966,"created_at":"2011-11-10T22:53:20Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/e26df88d621f60cc5487460580637f11?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"e26df88d621f60cc5487460580637f11","url":"https://api.github.com/users/joehobson","login":"joehobson","id":838671},"updated_at":"2011-11-11T00:58:07Z","url":"https://api.github.com/repos/LearningRegistry/LearningRegistry/issues/comments/2703634","body":"I looked for that in the spec and only found a place where it defined the result codes as 200 and 500. The Quick Ref guide only states that 500 is returned when \"The server encountered an unexpected condition which prevented it from fulfilling the request.\" \r\n\r\nAnd given that the harvest service is modeled on OAI-PMH you would think it would use the same logic as that protocol. I'm not sure about the specifics of the standard, but my OAI-PMH server still returns a 200 when passed an identifier that doesn't exist.\r\n\r\nAll in all, it just seems odd to return an error. Maybe we need to get more specific with our return codes, something that the Quick Ref already states is planned for the future.","id":2703634,"created_at":"2011-11-11T00:58:07Z"}}