502 bad gateway when calling API to create new product

Shopify Partner
1 0 0

Hi,

 

My app working fine with many new products being created but for some reason, this is on a product that fails to create. I not sure is it because it contains too many images? 

 

Ruby code:

p = ShopifyAPI::Product.new("tags"=>"newproducts", "published"=>false, "images"=>[ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2EvMS9hMV80NV8yOS5qcGc=&_nc_hash=qa1573974851fx", "position"=>1, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2EvMy9hM180M18yOC5qcGc=&_nc_hash=qa1573974851fx", "position"=>2, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2EvNC9hNF80MV8zMC5qcGc=&_nc_hash=qa1573974851fx", "position"=>3, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2EvMS9hMTBfMjhfMjMuanBn&_nc_hash=qa1573974851fx", "position"=>4, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2EvMS9hMTFfMjVfMjguanBn&_nc_hash=qa1573974851fx", "position"=>5, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2EvNi9hNl8zN18yNC5qcGc=&_nc_hash=qa1573974851fx", "position"=>6, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2EvNy9hN180MF8yOC5qcGc=&_nc_hash=qa1573974851fx", "position"=>7, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2EvOC9hOF8zNF8yNS5qcGc=&_nc_hash=qa1573974851fx", "position"=>8, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2EvNS9hNV8zNl8yOC5qcGc=&_nc_hash=qa1573974851fx", "position"=>9, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2EvOS9hOV8zMl8yNS5qcGc=&_nc_hash=qa1573974851fx", "position"=>10, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2EvMi9hMl80M18zNS5qcGc=&_nc_hash=qa1573974851fx", "position"=>11, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2QvMS9kMV8xNl8xNC5qcGc=&_nc_hash=qa1573974851fx", "position"=>12, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2QvMy9kM18xOV8xNC5qcGc=&_nc_hash=qa1573974851fx", "position"=>13, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2QvNC9kNF8xOF8xNC5qcGc=&_nc_hash=qa1573974851fx", "position"=>14, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2QvMS9kMTBfMTFfMTQuanBn&_nc_hash=qa1573974851fx", "position"=>15, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2QvMS9kMTFfMTBfMTAuanBn&_nc_hash=qa1573974851fx", "position"=>16, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2QvNy9kN18xMl8xNC5qcGc=&_nc_hash=qa1573974851fx", "position"=>17, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2QvNi9kNl8xNV8xNC5qcGc=&_nc_hash=qa1573974851fx", "position"=>18, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2QvOC9kOF8xM18xNC5qcGc=&_nc_hash=qa1573974851fx", "position"=>19, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2QvNS9kNV8xN18xNC5qcGc=&_nc_hash=qa1573974851fx", "position"=>20, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2QvOS9kOV8xNV8xMy5qcGc=&_nc_hash=qa1573974851fx", "position"=>21, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2QvMi9kMl8xNF8xMy5qcGc=&_nc_hash=qa1573974851fx", "position"=>22, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L3MvMS9zMV8xNF8zNy5qcGc=&_nc_hash=qa1573974851fx", "position"=>23, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L3MvMy9zM18xMl8zMS5qcGc=&_nc_hash=qa1573974851fx", "position"=>24, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L3MvNC9zNF8xNF8yOS5qcGc=&_nc_hash=qa1573974851fx", "position"=>25, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L3MvMS9zMTBfNl8yMy5qcGc=&_nc_hash=qa1573974851fx", "position"=>26, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L3MvMS9zMTFfNl8xNy5qcGc=&_nc_hash=qa1573974851fx", "position"=>27, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L3MvNy9zN18xMV8zMC5qcGc=&_nc_hash=qa1573974851fx", "position"=>28, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L3MvNi9zNl8xMV8zMC5qcGc=&_nc_hash=qa1573974851fx", "position"=>29, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L3MvNS9zNV8xMl8yOS5qcGc=&_nc_hash=qa1573974851fx", "position"=>30, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L3MvOC9zOF8xMF8yOC5qcGc=&_nc_hash=qa1573974851fx", "position"=>31, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L3MvOS9zOV85XzI1LmpwZw==&_nc_hash=qa1573974851fx", "position"=>32, "alt"=>""), ShopifyAPI::Image.new("src"=>"https://cdn.costway.com/safe_image.php?d=hysz1573974851&url=aHR0cHM6Ly9hc3NldHMuY29zdHdheS5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L3MvMi9zMl8xMl8zNi5qcGc=&_nc_hash=qa1573974851fx", "position"=>33, "alt"=>"")], "metafields"=>[], "variants"=>[ShopifyAPI::Variant.new("inventory_management"=>"shopify", "inventory_policy"=>"deny", "metafields"=>[], "sku"=>"HW63008PI", "price"=>52.95, "option1"=>"Low-back Computer Task Office Desk Chair with Swivel Casters-Pink", "inventory_quantity"=>160), ShopifyAPI::Variant.new("inventory_management"=>"shopify", "inventory_policy"=>"deny", "metafields"=>[], "sku"=>"HW63008ZS", "price"=>52.95, "option1"=>"Low-back Computer Task Office Desk Chair with Swivel Casters-Purple", "inventory_quantity"=>117)], "options"=>[{"name"=>"Color"}], "existing"=>false, "title"=>"Low-back Computer Task Office Desk Chair with Swivel Casters-Green", "body_html"=>"<p>This is executive office chair which features sophisticated profile and exquisite workmanship to keep you comfortable all day.   Sitting at a desk for a long time can lead to frequent backache. Are you looking for better office conditions? The low-back office chair can meet your needs. The breathable mesh backrest provides ergonomic lumbar support to prevent back strain and muscle fatigue, while ensuring air circulation and improving comfort. You can adjust the seat height from 17\" to 20.5\" effortlessly through the handle at the bottom of the seat. Additionally, 360 degree swivel seat helps you better communicate with colleagues around you, which greatly improves your work efficiency. A perfect addition for childrens room, study, dorm and other occasions. Let the rolling task chair replace your hard seat and bring you a new Life!   If you are looking for executive office chair, dont hesitate to buy one.    Adjustable seat height, meet different needs for matching up height of table 360 degree swivel seat for multi-tasking convenience Breathable mesh backrest, comfortable and not stuffy Ergonomic lumbar support protects your waist well Soft cushion filled with high-density sponge eliminates your fatigue Universal wheels add freedom of flexible movement Stable and durable structure, serve you for many years Unique bright color chair, great complement of childrens room, study, office, etc. Can withstand up to 220 lbs steadily</p><p>Specification: Color: Blue \/ Pink \/ Purple Material: mesh, sponge, plastic Overall dimension: 24.5\" x 24.5\" x 33.5\" - 37\" (L x W x H) Back size: 16\" x 18\" ( W x H) Seat size: 18\" x 17\" (W x D) Seat height: 17\" - 20.5\" Net weight: 15.5 lbs Weight capacity: 220 lbs Package includes: 1 x Office chair 1 x Instruction</p>", "vendor"=>"Costway", "product_type"=>"Furniture > Office Furniture > Office Chairs")
p.save

This returns 502 bad gateway error. Please help me out here. 

 

 

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
240 32 37

Hey @Jor_Han_Lau,

 

Can you please provide a request ID from the response headers?

0 Likes