Error detection is done both by data link and transport layers, but error correction is done only at the transport layer. So the answer is 1. In information and coding theory with applications in computer science and telecommunications.
Many communication channels are at the mercy of channel noise, and thus errors may be found during transmissions from the source to a receiver. Error observation techniques allow detecting such errors, while errors corrections enable reconstruction from the original data in many cases.
Error observation is the detection of errors caused by noise or other impairments during transmission from the transmitter to the receiver.
The Transport Layer and Data Layer can provide error detection and correction at the different levels of data transmission. I will accept 3 layers as a correct answer too as the Network layer can also correct errors if it detects them.