refactor: dip 적용으로 의존성을 느슨한 결합으로 전환 및 디자인 패턴 적용
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
package com.study.course_registration.failure;
|
||||
|
||||
import com.study.course_registration.enums.RegistrationErrorCode;
|
||||
|
||||
public final class RetryableInfrastructureFailure extends ApplicationFailure {
|
||||
private RetryableInfrastructureFailure(String message, Throwable cause) {
|
||||
super(RegistrationErrorCode.LOCK_TIMEOUT, message, cause);
|
||||
}
|
||||
|
||||
public static RetryableInfrastructureFailure lockTimeout(Throwable cause) {
|
||||
return new RetryableInfrastructureFailure(
|
||||
"다른 요청이 처리 중입니다. 잠시 후 다시 시도해 주세요.",
|
||||
cause);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user