This reaction is known as carbylamine
reaction or isocyanide test and is used as a test for primary amines 5 Reaction with nitrous acid
Three classes of amines react differently with nitrous acid which is
prepared in situ from a mineral acid and sodium nitrite (a) Primary aliphatic amines react with nitrous acid to form aliphatic
diazonium salts which being unstable, liberate nitrogen gas
quantitatively and alcohols