improve error handling documentation