Add example documentation for accessing the underlying error objects. fixes #1326