Class DataExchangeError

java.lang.Object
com.broadleafcommerce.dataexchange.domain.exception.DataExchangeError
All Implemented Interfaces:
Serializable

public class DataExchangeError extends Object implements Serializable
Container to provide granular details about individual errors that may have occurred during the processing of a batch.
Author:
Kelly Tisdell
See Also:
  • Constructor Details

    • DataExchangeError

      public DataExchangeError()
  • Method Details

    • getHttpStatus

      public int getHttpStatus()
      HTTP status code associated with this error (typically received from another service-to-service call).
    • getError

      public Object getError()
      Message indicating details about the exception or error. This is typically a string or map, but may be any JSON serializable object.
    • getType

      public String getType()
      Indicates the type of the error. May be used to categorize the error for easier handling by the client.
    • getPath

      public String getPath()
      JSON path to the entity associated with this error.
    • getUrlPath

      public String getUrlPath()
      The URL path associated with the error if available. (e.g. "/products", "/variants", etc.)
    • getHttpMethod

      public String getHttpMethod()
      The HTTP method type (PUT/PATCH/POST/DELETE) if available.
    • getStackTrace

      public String getStackTrace()
      The stack trace associated with the error. This is not typically returned to the client, but may be enabled for debugging purposes. See DataExchangeErrorProperties.
    • getHeaders

      public Map<String,Map<String,Object>> getHeaders()
      The request/response headers if this error was generated from a service-to-service call. This is not enabled by default and must be enabled via property. See: DataExchangeErrorProperties.setReturnRequestHeaders(boolean) DataExchangeErrorProperties.setReturnResponseHeaders(boolean) WebClientHttpRequestAwareErrorResolver
    • getOriginalError

      public Throwable getOriginalError()
      The original error.
    • setHttpStatus

      public void setHttpStatus(int httpStatus)
      HTTP status code associated with this error (typically received from another service-to-service call).
    • setError

      public void setError(Object error)
      Message indicating details about the exception or error. This is typically a string or map, but may be any JSON serializable object.
    • setType

      public void setType(String type)
      Indicates the type of the error. May be used to categorize the error for easier handling by the client.
    • setPath

      public void setPath(String path)
      JSON path to the entity associated with this error.
    • setUrlPath

      public void setUrlPath(String urlPath)
      The URL path associated with the error if available. (e.g. "/products", "/variants", etc.)
    • setHttpMethod

      public void setHttpMethod(String httpMethod)
      The HTTP method type (PUT/PATCH/POST/DELETE) if available.
    • setStackTrace

      public void setStackTrace(String stackTrace)
      The stack trace associated with the error. This is not typically returned to the client, but may be enabled for debugging purposes. See DataExchangeErrorProperties.
    • setHeaders

      public void setHeaders(Map<String,Map<String,Object>> headers)
      The request/response headers if this error was generated from a service-to-service call. This is not enabled by default and must be enabled via property. See: DataExchangeErrorProperties.setReturnRequestHeaders(boolean) DataExchangeErrorProperties.setReturnResponseHeaders(boolean) WebClientHttpRequestAwareErrorResolver
    • setOriginalError

      public void setOriginalError(Throwable originalError)
      The original error.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object