It looks like there is a syntax issue. The correct syntax would be
th:attr="abc=${param.error} ? '123'"
Notice where the } is closing. More info on conditional expressions.
}