add an example of handling errors