changing error to danger to make flash work