Add code for replies and errors.