[Backport] Fix flash_messages.error(request, msg) call

Method signature only accepts msg parameter, no request.