Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<groupId>com.github.switcherapi</groupId>
<artifactId>switcher-client</artifactId>
<packaging>jar</packaging>
<version>1.4.0</version>
<version>1.4.1-SNAPSHOT</version>

<name>Switcher Client</name>
<description>Switcher Client SDK for working with Switcher API</description>
Expand Down Expand Up @@ -59,20 +59,20 @@
<!-- utils -->
<commons-lang3.version>3.12.0</commons-lang3.version>
<commons-net.version>3.9.0</commons-net.version>
<log4j.version>2.19.0</log4j.version>
<log4j.version>2.20.0</log4j.version>

<!-- test -->
<okhttp.version>5.0.0-alpha.11</okhttp.version>
<junit.version>5.9.2</junit.version>
<junit-pioneer.version>1.9.1</junit-pioneer.version>

<!-- Plugins -->
<maven-compiler.version>3.10.1</maven-compiler.version>
<maven-compiler.version>3.11.0</maven-compiler.version>
<maven-source.version>3.2.0</maven-source.version>
<maven-surefire.version>3.0.0-M5</maven-surefire.version>
<maven-gpg.version>3.0.1</maven-gpg.version>
<sonar.version>3.9.1.2184</sonar.version>
<jacoco.version>0.8.8</jacoco.version>
<jacoco.version>0.8.9</jacoco.version>

<!-- Sonar -->
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
Expand Down Expand Up @@ -167,10 +167,22 @@
<version>4.13.1</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.15.1</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.14.2</version>
<version>2.15.1</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jakarta-xmlbind-annotations</artifactId>
<version>2.15.1</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.github.switcherapi.client.exception.SwitcherAPIConnectionException;
import com.github.switcherapi.client.exception.SwitcherRemoteException;
import com.github.switcherapi.client.exception.SwitcherSnapshotWriteException;
import com.github.switcherapi.client.model.ContextKey;
import com.github.switcherapi.client.model.Switcher;
Expand Down Expand Up @@ -99,7 +99,7 @@ protected Domain initializeSnapshotFromAPI() {
environment);

return snapshot.getDomain();
} catch (SwitcherAPIConnectionException | SwitcherSnapshotWriteException e) {
} catch (SwitcherRemoteException | SwitcherSnapshotWriteException e) {
logger.error(e);
throw e;
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.github.switcherapi.client.exception;

/**
* @author Roger Floriano (petruki)
* @since 2019-12-24
*/
public class SwitcherRemoteException extends SwitcherException {

public SwitcherRemoteException(final String url, final Exception e) {
super(String.format("It was not possible to reach the Switcher-API on this endpoint: %s", url), e);
}

public SwitcherRemoteException(final String url, int status) {
super(String.format("It was not possible to reach the Switcher-API on this endpoint: %s - status: %s", url, status), null);
}

public SwitcherRemoteException(final String url) {
super(String.format("It was not possible to reach the Switcher-API on this endpoint: %s", url), null);
}

}

This file was deleted.

Loading