Fix exit on error in http handler
Handle empty result sets as not found, fixes IM-22