Updated docstrings for @ajax decorator and errors function