I think there's still a bug if we return an array where the first entry is a formatted error (i.e. a nested array), but I can fix that in formatError().