apidocs / com.srv4pos.server.api.exceptions

Package com.srv4pos.server.api.exceptions

Types

FriendlyException

interface FriendlyException

In case of non-friendly exception developer will get a notification (most likely trough email) from production that something goes wrong. But this exception is expected by business logic. No signal should be sent to the developer.

ValueNotValidJsonExceptionDetails

class ValueNotValidJsonExceptionDetails

Class that describing info about individual violation.

Exceptions

ConcurrentModificationJsonException

class ConcurrentModificationJsonException : JsonException

Created by fasth on 14.10.2014.

ControlUnitCommunicationJsonException

class ControlUnitCommunicationJsonException : JsonException, FriendlyException

When error has happened during transmission data.

ControlUnitReceiptJsonException

class ControlUnitReceiptJsonException : JsonDetailedException, FriendlyException

The details contains three fields:

ControlUnitUnavailableJsonException

class ControlUnitUnavailableJsonException : JsonException, FriendlyException

When server is unable to reach the control unit device (for instance it's ejected from the server).

ForbiddenJsonException

class ForbiddenJsonException : JsonDetailedException

When service returns 403 HTTP status code. For instance if one seller is trying to access data of another seller. Or seller is trying to reach data available for admins only.

HttpHeaderMissingJsonException

class HttpHeaderMissingJsonException : JsonDetailedException

If request param doesn't contain required http header.

InconsistentDataJsonException

class InconsistentDataJsonException : JsonDetailedException

When data sent to the server is in inconsistent state. Exception is packed with unique code as com.srv4pos.server.api.infrastructure.exceptions.enums.InconsistentDataErrorType.

InternalServerErrorJsonException

class InternalServerErrorJsonException : JsonDetailedException

In case of something wrong is going on the server. See .getDetails and .getResponseCode for more info

InvalidETagFormatJsonException

class InvalidETagFormatJsonException : JsonException

Occurs when provided ETag format is not a quoted string with version inside. Created by fasth on 14.08.14.

MessageNotReadableJsonException

class MessageNotReadableJsonException : JsonDetailedException

When sent JSON is failed to parse.

NonUniqueJsonException

class NonUniqueJsonException : JsonDetailedException

When passed data violates some unique constraint.

NotFoundJsonException

class NotFoundJsonException : JsonException

When service returns 404 HTTP status code.

NotImplementedJsonException

class NotImplementedJsonException : JsonDetailedException, FriendlyException

Thrown by any method. Make sense to catch for com.srv4pos.server.api.auth.AuthService.handshake ()}. Happens usually for local servers: when android device is up to date, but server is not.

OutdatedVersionJsonException

class OutdatedVersionJsonException : JsonException, FriendlyException

Means that server doesn't support the version at all, you have to update your app as soon as possible. User: Kirill Date: 23.07.13 15:02

ReferenceNotFoundJsonException

class ReferenceNotFoundJsonException : JsonDetailedException

This exception occurs when SomethingInfo dto class contains a field which references to another entity and the algorithm assumes it has to be on the server but it doesn't.

RequestEntityTooLargeJsonException

class RequestEntityTooLargeJsonException : JsonException

RequestMethodNotSupportedJsonException

class RequestMethodNotSupportedJsonException : JsonDetailedException

RequestParameterMissingJsonException

class RequestParameterMissingJsonException : JsonDetailedException

If request param doesn't contain required http header.

ServiceUnavailableJsonException

class ServiceUnavailableJsonException : JsonDetailedException

Dropped by the server if server is off (for instance server is restarting or in a service mode) or not ready.

TypeMismatchJsonException

class TypeMismatchJsonException : JsonDetailedException

When some entity fails during type conversion. For example, passed java.lang.String as query param is not convertible to java.util.Date. Also occurs when there is a type mismatch during JSON parsing.

UnauthorizedJsonException

class UnauthorizedJsonException : JsonDetailedException

Dropped by server when user tries access resource without any authentications.

UnprocessableEntityJsonException

class UnprocessableEntityJsonException : JsonDetailedException

This exception occurs when every entity field passes validation but there is a logical (semantical) violation.

ValueNotValidJsonException

class ValueNotValidJsonException : JsonException

Thrown when some value of field fails validation. See com.srv4pos.server.api.exceptions.ValueNotValidJsonExceptionDetails for details. One field can have one or more violations.

VersionConflictJsonException

class VersionConflictJsonException : JsonException

Occurs when we upload data to the server but server contains more fresh data than we send.