Better error handling

Now that WPR is returning proper response codes, let's make sure we add appropriate error handling