Skip to content

Commit

Permalink
fix(jackson): Fix deserialization of AlgoliaException
Browse files Browse the repository at this point in the history
Closes #384
  • Loading branch information
ElPicador committed Oct 11, 2017
1 parent 903a0ec commit 8b3709f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.algolia.search.exceptions;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/** Generic Algolia Exception */
@JsonIgnoreProperties(ignoreUnknown = true)
public class AlgoliaException extends Exception {

public AlgoliaException(String message) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.algolia.search.exceptions;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/** Algolia Exception if there was an unexpected response code (!= 2XX) */
@JsonIgnoreProperties(ignoreUnknown = true)
public class AlgoliaHttpException extends AlgoliaException {

/** HTTP response code of the Algolia API */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.algolia.search.exceptions;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.List;
import java.util.stream.Collectors;

/** Algolia Exception if all retries failed */
@JsonIgnoreProperties(ignoreUnknown = true)
public class AlgoliaHttpRetriesException extends AlgoliaException {

/** List of exception if all retries failed */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.algolia.search.exceptions;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.io.IOException;

/** Algolia Exception if there was an IOError linked to a host */
@JsonIgnoreProperties(ignoreUnknown = true)
public class AlgoliaIOException extends AlgoliaException {

public AlgoliaIOException(String host, IOException e) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.algolia.search.exceptions;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/** Algolia Exception if an index does not exists */
@JsonIgnoreProperties(ignoreUnknown = true)
public class AlgoliaIndexNotFoundException extends AlgoliaException {

public AlgoliaIndexNotFoundException(String message) {
Expand Down

0 comments on commit 8b3709f

Please sign in to comment.