fix edge case when error returned is not an array

sometimes the error returned for a denied permission is "You do not have permissions for this action" and not an array,
this fixes it improperly trying to unshift a string