According to some people:
If you look carefully, you will find both the aldehyde radical and the carboxyl radical in formic acid:
The red line shows the aldehyde functional group character and the blue line indicates the carboxyl functional group character.
As a result, it has mainly characteristics of carboxyl compound, but sometimes shows carbonyl character as well which happens in case of tollen's reagent and fehling's solution reacting with it.
You can identify it by doing the 2:4-DNPH test to which the formic acid doesn't respond.
But to me and most other people:
This reaction certainly is given by aldehydes, it is not specific for this class of compound since many other acids, such as tartaric or citric, similarly reduce silver nitrate. The reduction of mercuric chloride to mercurous chloride by formates likewise offers no support for the aldehyde theory, since aldehydes in general, including formaldehyde, cannot effect this change. Actually, formates give none of the reactions which characterize an aldehyde; thus they fail to restore the colour to Schiff's reagent, produce no reaction with 2.4 dinitrophenylhydrazine hydrochloride, and above all do not reduce Fehling's solution, which is probably the most specific of all aldehyde reagents.