append to errors list a dictionary created with 2 etries, if escape_html is true, return value of the function escape
errors . append ( { 'message' : escape ( message ) if escape_html else message , 'code' : error . code or '' , } )