store error messages in flash, wrongly assumed that it could take key value