revised exception handling for empty fields.
This commit is contained in:
@@ -8,7 +8,6 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import com.vaessl.app.dto.ConnectionRequest;
|
||||
import com.vaessl.app.dto.ConnectionResponse;
|
||||
import com.vaessl.app.exception.ProviderNotFoundException;
|
||||
|
||||
@Service
|
||||
public class ConnectionService {
|
||||
@@ -27,9 +26,7 @@ public class ConnectionService {
|
||||
|
||||
ConnectionProvider provider = providerRegistry.get(request.serviceType());
|
||||
|
||||
if (provider == null) {
|
||||
throw new ProviderNotFoundException();
|
||||
}
|
||||
provider.checkCredentials(request);
|
||||
|
||||
ConnectionResponse response = provider.authenticate(request);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user