Updated errors in function docstrings