Basically, a text is considered as non-fitting if it's as out-of-measure, i.e. it is shorter or longer that the assigned space (frame - text container).
Area border color
You can set the area (frames) border color to reflect the fitting status of the text flowing in frames.
Two colors are available: one for text which is fitting (default is the blue color), and the another one, for the non-fitting text (default is the red color).
These settings are personal. Use Edit > Preferences > Colors to set colors and enable additional conditions.
See also About frame border color and tags.
Absolute non-fitting values
The data about how much is non-fitting is displayed in the status bar, and it can also be retrieved by Text.GetTextOverH (the typographical value in millipoints of depth difference between text and shape) and Text.GetTextOverN (the number of lines in given column).
Overfull lines, and non-fitting paragraphs
Two more conditions can be added to mark a text as non-fitting: overfull lines, and non-fitting paragraphs. It is achieved in the format defaults (see Justification defaults overview in the Typography chapter). Note: overfull lines may cause frames to remain red even when the overset counter in the status bar reads 0.
See also
How GN4 measures overset/underset?
About frame border color and tags