Add documentation for error responses. Fix #329