Why we are getting Http Code 200 from Shiphero even if its error out

Hi,

The data what we sent to the Shiphero, even its failed to create in shiphero, the response always get from shiphero as Http code 200,

Shiphero GraphQL Request:

mutation {

product_create(

data: {

name: “DP1-FTR”

sku: “DP1-FTR-BGE-LAR-FCB”

price: “”

warehouse_products: {

warehouse_id: “V2FyZWhvdXNlOjczNTE=”

on_hand: 0

expected_weight_in_lbs:“0.00”

price: “4.99”

custom: false

}

value: “20.20”

barcode: “12345”

country_of_manufacture: “US”

dimensions: { weight: “5”, height: “5”, width: “5”, length: “5” }

final_sale: false

customs_value: “1.00”

}

) {

request_id

complexity

product {

id

legacy_id

account_id

name

sku

price

value

barcode

country_of_manufacture

dimensions {

weight

height

width

length

}

tariff_code

kit

kit_build

no_air

final_sale

customs_value

customs_description

not_owned

dropship

created_at

}

}

}

Response:
PFA for postman we are getting http code 200 means success

Can you please let us know why we are always get success from shiphero even if the order/transaction not created/updated in shiphero.

Thanks
Mangesh

Hi @Mangesh!
Do you have the request_id you got back with the 200 that did not create the product?
That way I could check if it succeed or why it didn’t and it returned the 200.
Thanks in advance!
Tom

Hi Tom,

Sales order request error out =

{
“query”: “mutation {order_create(data: {order_number: “SO0190661” shop_name: “Akerson Enterprises LLC : Kindred Bravely” fulfillment_status: “Default” order_date: “8/3/2020” total_tax: “00” subtotal: “” total_discounts: “00” total_price: “” profile:“KB” allow_partial :false shipping_lines: {title: “Priority Shipping (1-3 business days)” price: “0.00”}shipping_address: {first_name: “Heather Cather” company: “” address1: “2247 Avenida Oliva” city: “San Clemente” state: “CA” zip: “92673” country: “United States” phone: “”}line_items: [{sku: “KB-2017-CLPGWN-BLA-XS” partner_line_item_id: “1” quantity:5 price: “100.00” product_name: “CUST91517 Shopify KB” fulfillment_status:“pending” quantity_pending_fulfillment:5 warehouse_id: “V2FyZWhvdXNlOjczNTE=”} , {sku: “KB-2017-CLPGWN-GRE-2XL” partner_line_item_id: “2” quantity:5 price: “100.00” product_name: “CUST91517 Shopify KB” fulfillment_status:“pending” quantity_pending_fulfillment:5 warehouse_id: “V2FyZWhvdXNlOjczNTE=”} , {sku: “KB-2017-CLPGWN-GRE-3XL” partner_line_item_id: “3” quantity:5 price: “100.00” product_name: “CUST91517 Shopify KB” fulfillment_status:“pending” quantity_pending_fulfillment:5 warehouse_id: “V2FyZWhvdXNlOjczNTE=”} , {sku: “KB-2017-CLPGWN-GRE-L” partner_line_item_id: “4” quantity:5 price: “100.00” product_name: “CUST91517 Shopify KB” fulfillment_status:“pending” quantity_pending_fulfillment:5 warehouse_id: “V2FyZWhvdXNlOjczNTE=”} ]}){request_id complexity order {id order_number shop_name fulfillment_status order_date total_tax subtotal total_discounts total_price custom_invoice_url account_id email profile packing_note required_ship_date shipping_address {first_name last_name company address1 address2 city state state_code zip country country_code email phone}line_items(first: 1) {edges {node {id sku product_id quantity product_name fulfillment_status quantity_pending_fulfillment quantity_allocated backorder_quantity eligible_for_return customs_value warehouse_id locked_to_warehouse_id}}}}}}”
}

response =

{
“errors”: [
{
“message”: “Unexpected Error”,
“operation”: “order_create”,
“field”: “order_create”,
“request_id”: “5f2d967b1c6ce5383968991b”,
“code”: 22
}
],
“data”: {
“order_create”: null
}
}

Http code = 200 OK

Thanks
Mangesh

Hi @Mangesh
I apologize for the confusion, I see what you are referring to now.
As for the 200 response it means that the request was able to reach successfully the Public API and back with a response.
As for the response, its an error because the total an subtotal are empty, and they must contain a valid value, for example:

      total_tax: "0.000"
      subtotal: "0.00"
      total_discounts: "0.00"
      total_price: "0.00"

Let me know if that solves the problem
Thanks again!
Tom