com.spotinst.sdkjava.exception.ExceptionHelper Maven / Gradle / Ivy
package com.spotinst.sdkjava.exception;
import com.spotinst.sdkjava.model.RepoGenericResponse;
import java.util.List;
/**
* Created by aharontwizer on 8/26/15.
*/
public class ExceptionHelper {
public static RepoGenericResponse handleHttpException(SpotinstHttpException exc) {
RepoGenericResponse retVal;
if (exc instanceof SpotinstHttpErrorsException) {
List httpErrors = ((SpotinstHttpErrorsException) exc).getHttpErrors();
retVal = new RepoGenericResponse<>(httpErrors);
} else {
retVal = new RepoGenericResponse<>(false);
}
return retVal;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy