added RemoteApiException
This commit is contained in:
@@ -9,10 +9,8 @@ import java.util.Map;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.client.RestClient;
|
||||
|
||||
import com.vaessl.app.exception.ConnectionNotFoundException;
|
||||
import com.vaessl.app.exception.EmptyCredentialsException;
|
||||
import com.vaessl.app.search.SearchRequest;
|
||||
import com.vaessl.app.search.SearchResponse;
|
||||
import com.vaessl.app.exception.RemoteApiException;
|
||||
|
||||
import static com.vaessl.app.connection.Endpoint.*;
|
||||
|
||||
@@ -60,8 +58,7 @@ public class HomeboxConnectionProvider implements ConnectionProvider {
|
||||
.body(HomeboxLoginResponse.class);
|
||||
|
||||
if (hbResponse == null) {
|
||||
throw new IllegalStateException(
|
||||
"Remote API returned an empty body for " + request.appUrl());
|
||||
throw new RemoteApiException(request.appUrl());
|
||||
}
|
||||
|
||||
Map<String, Object> attachmentToken = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user