All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.meta.ExceptionDocumentation Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.meta;

import io.sphere.sdk.models.errors.InvalidJsonInputError;

/**
 * The exception hierarchy documentation.
 *
 * 

Exceptions

* * visualization of the exception hierarchy * *

Open the exception hierarchy image in a new tab.

* * The JVM SDK makes use of exceptions of the Java JDK, such as {@link java.lang.IllegalArgumentException}, and provides own exceptions which all inherit from {@link io.sphere.sdk.models.SphereException}. * *

Problems concerning the {@link io.sphere.sdk.http.HttpClient} throw a {@link io.sphere.sdk.http.HttpException}.

* *

JSON serializing and deserializing problems throw {@link io.sphere.sdk.json.JsonException}.

* *

{@link io.sphere.sdk.client.SphereServiceException} is a base exception for all error responses from SPHERE.IO (HTTP status code {@code >= 400}).

* *

{@link io.sphere.sdk.client.ClientErrorException} expresses errors which can be recovered by the client side (HTTP status code {@code >= 400 and < 500}). * {@link io.sphere.sdk.client.ServerErrorException} is for server errors.

* *

Errors

* * If a command cannot be performed due to unfulfilled preconditions * SPHERE.IO can return one error response with multiple errors (listing of error codes). * The JVM SDK will then put a {@link io.sphere.sdk.client.ErrorResponseException} into a {@link java.util.concurrent.CompletionStage}. * * The following example shows how to distinguish errors by error code: * {@include.example io.sphere.sdk.customers.commands.CustomerChangePasswordCommandTest#demo()} * * Errors can contain extra information like {@link InvalidJsonInputError} hinting to the problem with the JSON: * * {@include.example io.sphere.sdk.models.SphereErrorTest#castToConcreteError()} * * * @see io.sphere.sdk.models.SphereException */ public final class ExceptionDocumentation { private ExceptionDocumentation() { } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy