# Error 22 on purchase\_order\_create

**URL:** <https://community.shiphero.com/t/error-22-on-purchase-order-create/367>\
**Category:** GraphQL API\
**Created:** [March 1, 2020, 10:47pm UTC](https://community.shiphero.com/t/error-22-on-purchase-order-create/367 "2020-03-01T22:47:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/david/32/22_2.png) [@david](https://community.shiphero.com/u/david)\
**Post date:** [March 1, 2020, 10:47pm UTC](https://community.shiphero.com/t/error-22-on-purchase-order-create/367/1 "2020-03-01T22:47:26Z")

</div>

Every so often we receive an error 22 on purchase order creation. The most recent response:

```
{'message': 'Unexpected Error', 'operation': 'purchase_order_create', 'field': 'purchase_order_create', 'request_id': '5e5c38e0b1e3addcab069bf8', 'code': 22}

```

The mutation for this is below. Any idea what is causing this?

```auto
mutation ($data: CreatePurchaseOrderInput!) {
 purchase_order_create(data: $data) {
   purchase_order {
     id
     po_number
   }
   complexity
 }
}

```

with variables:

```auto
{'data': {'po_date': '2020-03-18', 'po_number': '1169', 'subtotal': '547.80', 'shipping_price': '0.00', 'total_price': '547.80', 'warehouse_id': '<redacted>', 'vendor_id': 151164, 'fulfillment_status': 'Pending', 'line_items': [{'sku': 'VV101', 'quantity': 1, 'expected_weight_in_lbs': '0.6', 'price': '21.00', 'vendor_sku': 'VV101', 'fulfillment_status': 'Pending'}, {'sku': 'DF516', 'quantity': 1, 'expected_weight_in_lbs': '0.2', 'price': '18.00', 'vendor_sku': 'DF516', 'fulfillment_status': 'Pending'}, {'sku': 'HL28224-FBA', 'quantity': 5, 'expected_weight_in_lbs': '3.1', 'price': '25.80', 'vendor_sku': '28224', 'fulfillment_status': 'Pending'}, {'sku': 'HL24897', 'quantity': 2, 'expected_weight_in_lbs': '0.4', 'price': '13.00', 'vendor_sku': '24897', 'fulfillment_status': 'Pending'}, {'sku': 'HL29073', 'quantity': 2, 'expected_weight_in_lbs': '0.8', 'price': '18.00', 'vendor_sku': '29073', 'fulfillment_status': 'Pending'}, {'sku': 'DF315', 'quantity': 2, 'expected_weight_in_lbs': '0.7', 'price': '19.50', 'vendor_sku': 'DF315', 'fulfillment_status': 'Pending'}, {'sku': 'JJ1273-3', 'quantity': 1, 'expected_weight_in_lbs': '0.1', 'price': '7.20', 'vendor_sku': 'JJ12733', 'fulfillment_status': 'Pending'}, {'sku': 'J3102', 'quantity': 5, 'expected_weight_in_lbs': '3.1', 'price': '27.60', 'vendor_sku': 'J3102', 'fulfillment_status': 'Pending'}, {'sku': 'HL19743', 'quantity': 1, 'expected_weight_in_lbs': '0.4', 'price': '21.00', 'vendor_sku': '19743', 'fulfillment_status': 'Pending'}, {'sku': 'HL25267', 'quantity': 1, 'expected_weight_in_lbs': '0.5', 'price': '35.00', 'vendor_sku': '25267', 'fulfillment_status': 'Pending'}, {'sku': 'HL23953', 'quantity': 1, 'expected_weight_in_lbs': '0.4', 'price': '25.80', 'vendor_sku': '23953', 'fulfillment_status': 'Pending'}, {'sku': 'HL22910', 'quantity': 2, 'expected_weight_in_lbs': '0', 'price': '13.00', 'vendor_sku': '22910', 'fulfillment_status': 'Pending'}, {'sku': 'HL28225', 'quantity': 1, 'expected_weight_in_lbs': '0.6', 'price': '25.80', 'vendor_sku': '28225', 'fulfillment_status': 'Pending'}]}}

```
