TECH: add some tests, add getError(status, code) to the methodDoc, remove some unused code.