Mysterious "invalid order type"

Occasionally, I get this exception while submitting an order but am not changing the order type.

requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity for url:
... invalid order type

Searching for the string “invalid order type” in the documentation, in the forum, in github and even in google (in conjunction with “alpaca”) is not informative as to what might be happening.