error handling, docs