// Path: src/main/java/com/webfluxclient/utils/DataBuffers.java
// public class DataBuffers {
//     
//     public static String readToString(DataBuffer dataBuffer) {
//         try {
//             return FileCopyUtils.copyToString(new InputStreamReader(dataBuffer.asInputStream()));
//         }
//         catch (IOException e) {
//             return e.getMessage();
//         }
//     }
// }


import com.webfluxclient.utils.DataBuffers;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.http.HttpStatus;
package com.webfluxclient.codec;


public class HttpClientErrorDecoder implements ErrorDecoder<HttpClientException> {
    @Override
// Path: src/main/java/com/webfluxclient/utils/DataBuffers.java
// public class DataBuffers {
//     
//     public static String readToString(DataBuffer dataBuffer) {
//         try {
//             return FileCopyUtils.copyToString(new InputStreamReader(dataBuffer.asInputStream()));
//         }
//         catch (IOException e) {
//             return e.getMessage();
//         }
//     }
// }


// Path: src/main/java/com/webfluxclient/codec/HttpClientErrorDecoder.java
import com.webfluxclient.utils.DataBuffers;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.http.HttpStatus;

package com.webfluxclient.codec;


public class HttpClientErrorDecoder implements ErrorDecoder<HttpClientException> {
    @Override
    public boolean canDecode(HttpStatus httpStatus) {