Skip to content

Commit ada63cf

Browse files
author
Mark
committed
changed responsecode check
1 parent d01d050 commit ada63cf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/com/arangodb/internal/velocystream/Communication.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
*/
5151
public class Communication {
5252

53-
private static final int SPARTA = 300;
53+
private static final int ERROR_STATUS = 400;
5454

5555
private static final Logger LOGGER = LoggerFactory.getLogger(Communication.class);
5656

@@ -134,8 +134,7 @@ private Communication(final String host, final Integer port, final Integer timeo
134134
this.password = Optional.ofNullable(password);
135135
this.vpack = vpack;
136136
this.collectionCache = collectionCache;
137-
this.chunksize = Optional.ofNullable(chunksize)
138-
.orElse(ArangoDBConstants.CHUNK_DEFAULT_CONTENT_SIZE);
137+
this.chunksize = Optional.ofNullable(chunksize).orElse(ArangoDBConstants.CHUNK_DEFAULT_CONTENT_SIZE);
139138
connectionAsync = new ConnectionAsync.Builder(messageStore).host(host).port(port).timeout(timeout)
140139
.useSsl(useSsl).sslContext(sslContext).build();
141140
connectionSync = new ConnectionSync.Builder().host(host).port(port).timeout(timeout).useSsl(useSsl)
@@ -197,7 +196,7 @@ public Response executeSync(final Request request) throws ArangoDBException {
197196

198197
private void checkError(final Response response) throws ArangoDBException {
199198
try {
200-
if (response.getResponseCode() >= SPARTA) {
199+
if (response.getResponseCode() >= ERROR_STATUS) {
201200
if (response.getBody().isPresent()) {
202201
throw new ArangoDBException(createErrorMessage(response));
203202
} else {

0 commit comments

Comments
 (0)