bug fixes
This commit is contained in:
@@ -75,10 +75,6 @@ public class VelocityPaymentService {
|
||||
if(errors != null && !errors.isEmpty()){
|
||||
String errorMessage = errors.get(0);
|
||||
|
||||
if(errorMessage.contains("already exists")) {
|
||||
log.warn("Customer already exists in Velocity: {}", errorMessage);
|
||||
throw new AlreadyExistsException(errorMessage); // or handle as needed
|
||||
}
|
||||
log.error("Error creating customer: {}", errorMessage);
|
||||
throw new IllegalStateException("Error creating customer: " + errorMessage);
|
||||
}
|
||||
@@ -86,6 +82,11 @@ public class VelocityPaymentService {
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
log.error("Error creating customer: {}", e.getMessage(), e);
|
||||
if(e.getMessage().contains("already exists")) {
|
||||
log.warn("Customer already exists in Velocity: {}", e.getMessage());
|
||||
throw new AlreadyExistsException(e.getMessage()); // or handle as needed
|
||||
}
|
||||
|
||||
throw new IllegalStateException("Error creating customer: " + e.getMessage(), e);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user