Update readme.md

extended example to cover $data['error']. might help someone in the future to save 60 seconds reading the code ;)