It's also used when a document with a given id isn't found.  Is it actually used when a doc has the wrong doc_type? I've found couchdbkit to be pretty hands off in terms of ensuring that a given class is associated with a given doc_type.