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: https://paper-api.alpaca.markets/v2/orders
...
alpaca_trade_api.rest.APIError: 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.