php - i have error like bad request while add product in shopify using api -
following errors has occured:
fatal error: uncaught exception 'shopifyapiexception' message 'bad request' in d:\xampp\htdocs\cutoutphoto\lib\shopify.php:87 stack trace: #0 d:\xampp\htdocs\cutoutphoto\lib\shopify.php(203): shopifyclient->call('post', '/admin/products...', '{"image":{"posi...') #1 d:\xampp\htdocs\cutoutphoto\requests.php(217): shopifyclient->update_image('134789371', 'd:\xampp\tmp\ph...', 'tango-featured....') #2 {main} thrown in d:\xampp\htdocs\cutoutphoto\lib\shopify.php on line 87
wrap method or lines have shopifyclient->update_image() in try...catch block
eg:
try { shopifyclient->update_image('134789371', '/location/of/the/file', ...); } catch(exception $e){ //do exception echo $e->getmessage(); }
i think might getting bad request error because not passing parameters api or sending params in incorrect format. also, check if using correct authentication credentials api.
also, helpful answer questions if provide more information code trying do, post block of code here, rather stack trace. see first post on stack overflow don't mind :)
Comments
Post a Comment