Error handling is a function that occurs at multiple layers, but it is a primary responsibility of specific layers.
(A) Physical Layer (Layer 1): This layer only transmits raw bits; it does not have mechanisms to detect or correct errors in those bits.
(B) Data Link Layer (Layer 2): A key responsibility of this layer is to ensure reliable, error-free transmission between two directly connected nodes (hop-to-hop reliability). It achieves this by grouping bits into frames and adding a checksum or CRC (Cyclic Redundancy Check) to detect errors. Some protocols at this layer can also request retransmission to correct errors.
(C) Session Layer (Layer 5): Manages dialogues (sessions) between computers.
(D) Application Layer (Layer 7): Provides an interface for applications to access the network.
The Transport Layer (Layer 4) also performs error checking for end-to-end reliability. However, among the given options, the Data Link Layer is the one most fundamentally associated with error detection and correction for a single network link.