500 error when creating order

Hi,
We are creating orders via API but keep getting the 500 error as below for some orders (most orders are created correctly). Is there any way to find the root of the issue here?
ERROR createOrder {“status”:“500”,“error”:“Internal Server Error”}

Thank you.