Fix error handling

Fixes error handling.  Current implementation incorrectly returns a JSONified structure (string), rather than a structure.  Returning a hash in an error condition isn't the right approach anyway as it makes get_products.each not possible.  An exception is the better approach which is what this patch does.