More examples of using the API, error reporting