Buy Market Order for Call Processed as Covered Call

This morning I placed two market orders to buy two call contracts per order (POST on /v2/orders). The orders did not go through, both yielding status 403 “code”:40310000,“message”:“insufficient underlying qty available for covered call (required: 200, available: 0)”

It seems as though these orders were processed as sell orders instead of buy orders. The code was working properly before and I did not change it. I switched to paper trading and the issue was resolved. I switched back to live trading and the code worked properly again. With no changes made to the code.

What happened? It may have been a fluke but this is absolutely unacceptable. I lost out on money today because the API was not working properly. How do I make sure this never happens ever again?