500 Eror while creating Orders


#1

Hello there,
I noticed that during last days “500 Internal server error” occures too often while creating order.
By 3000 tries there is more than 400 errors.
It would be great if you checked this.
Thanks a lot :slight_smile:


#2

Hey @andrjuha01

We’re investigating at the moment.
If you’re sending the requests with Misha’s account it looks like its because you’re line items have an extra nested array.

You’re request looks like:
line_items_attributes":[[{"price_per_unit":1.0,"quantity":1,"sellable_id":7262612,"tax_rate":0}]]

and it should be:
line_items_attributes":[{"price_per_unit":1.0,"quantity":1,"sellable_id":7262612,"tax_rate":0}]


#3

aha, I’ll check it, thank you


#4

Looks like you’re hitting a load of errors again. Did you update the arrays or is there another problem?


#5

Some another problem. I’m right fixing it.


#6

now I have following hash:
{:order=>{:channel_id=>47805, :customer_id=>10093530, :status=>“awaiting_payment”, :delivery_method_id=>173376, :deliver_to_attributes=>{:first_name=>“A”, :last_name=>“A”, :company=>nil, :address1=>“22 AAA AA”, :address2=>“AAA”, :city=>“AAA”, :country=>“NZ”, :zip=>“AAA”, :customer_id=>10093530}, :line_items_attributes=>[{:sellable_id=>12845451, :tax_rate=>0, :quantity=>4, :price_per_unit=>“2.95”}, {:sellable_id=>12845421, :tax_rate=>0, :quantity=>4, :price_per_unit=>“2.95”}], :payment_attributes=>{:payment_type=>“Card”, :reference_number=>nil}}}
For that one I’ve got 500 Error, but after retry everything went smoothly.