/clear returns an error if there is an item in the offhand slot
If you have an item in your offhand slot and try to use /clear, it'll give you back the unknown error has occurred message. It will clear the rest of your inventory, but the offhand slot stays. My examples below use a map and planks but it works with any block or item.
2015-07-29, 06:17 PM
2015-07-29, 07:16 PM
2015-07-29, 07:16 PM
0
1
-