doc: add section on error handling.