Added check for an error rather than depending on data object having a success property
Added check for an error rather than depending on data object having a success property

bobness/pmboard,bobness/pmboard