package com.sptg.permissions.api.feigns.fallback;

import com.sptg.permissions.api.feigns.JobLogFeign;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * title: JobLogFeignFallbackFactory
 * package: com.sptg.permissions.api.feigns.fallback
 * description:
 *
 *                  
 *                 
 */
@Component
@Slf4j
public class JobLogFeignFallbackFactory implements FallbackFactory<JobLogFeign> {

    @Override
    public JobLogFeign create(Throwable cause) {
        return (jobLog) -> {
            log.error(cause.getMessage());
            return null;
        };
    }
}
