Define custom error using request attribute

Is your request attribute configured as numeric (integer for example)? If not this may be reason

Sebastian