Fixed doc_count on database GET, added tests
Return correct errors on document GET