default void convertAndThrowException(@NotNull final IOException e, @NotNull final HttpURLConnection con)
        throws IOException, CopyExceptionWithFailureReason {

        switch (con.getResponseCode()) {
            case SC_UNAUTHORIZED:
                throw new UnconfirmedUserException("Unauthorized iCloud User", e);
            case SC_PRECONDITION_FAILED:
                throw new PermissionDeniedException("Permission Denied", e);
            case SC_NOT_FOUND:
                throw new DestinationNotFoundException("iCloud Photos Library not found", e);
            case SC_INSUFFICIENT_STORAGE:
                throw new DestinationMemoryFullException("iCloud Storage is full", e);
            case SC_SERVICE_UNAVAILABLE:
                throw new IOException("DTP import service unavailable", e);
            case SC_BAD_REQUEST:
                throw new IOException("Bad request sent to iCloud Photos import api", e);
            case SC_INTERNAL_SERVER_ERROR:
                throw new IOException("Internal server error in iCloud Photos service", e);
            case SC_OK:
                break;
            default:
                throw e;
        }
    }
The Base Interface for all the {@link org.datatransferproject.types.common.models.DataVertical}s
that Apple Supports.
extensions/data-transfer/portability-data-transfer-apple/src/main/java/org/datatransferproject/datatransfer/apple/AppleBaseInterface.java