This error message can be made more specific with more context:
mongos> db.a.update({$where:"this.sk==1"}, {$set:{foo:1}}) can't do non-multi update with query that doesn't have a valid shard key
Into something like this:
Cannot find shard key (<key>) in the query (<query>) which is required for non-multi update. [Javascript $where queries are not supported for this operation]
Where the query and shard key are included. In this case the $where should be called out as not supported as well.