Ovok exception

Generated reference for ovok_sdk: ovok exception.

  • Stable unknown
  • Release candidate since 0.1.0-rc.4
  • Development since 0.1.0-dev.23+d339d81

OvokAuthenticationException

class OvokAuthenticationException extends OvokException

Constructors

OvokAuthenticationException.new

OvokAuthenticationException(OvokErrorDetails details, {Object? cause})

Creates the exception from details.

ParameterTypeKindDefault
detailsOvokErrorDetailspositional
causeObject?named

OvokConfigException

class OvokConfigException extends OvokException

A bad option, or an action this client cannot take.

Constructors

OvokConfigException.new

OvokConfigException(OvokErrorDetails details, {Object? cause})

Creates the exception from details.

ParameterTypeKindDefault
detailsOvokErrorDetailspositional
causeObject?named

OvokConflictException

class OvokConflictException extends OvokException

Constructors

OvokConflictException.new

OvokConflictException(OvokErrorDetails details, {Object? cause})

Creates the exception from details.

ParameterTypeKindDefault
detailsOvokErrorDetailspositional
causeObject?named

OvokConnectionException

class OvokConnectionException extends OvokException

No answer: a network failure or a timeout.

Constructors

OvokConnectionException.new

OvokConnectionException(OvokErrorDetails details, {Object? cause})

Creates the exception from details.

ParameterTypeKindDefault
detailsOvokErrorDetailspositional
causeObject?named

OvokErrorDetails

class OvokErrorDetails

What an OvokException carries; every field but message may be unknown.

Constructors

OvokErrorDetails.new

OvokErrorDetails({
  required String message,
  int? status,
  String? code,
  String? type,
  String? traceId,
  String? requestId,
  int? retryAfterMs,
  List<OvokFieldError> fieldErrors = const [],
})

Creates the details; the SDK builds these from error responses.

ParameterTypeKindDefault
messageStringrequired named
statusint?named
codeString?named
typeString?named
traceIdString?named
requestIdString?named
retryAfterMsint?named
fieldErrorsList<OvokFieldError>namedconst []

Properties

OvokErrorDetails.message

final String message

A human-readable description of the failure.

OvokErrorDetails.status

final int? status

The HTTP status; null when no response arrived.

OvokErrorDetails.code

final String? code

The condition the server named; null when only the status is known.

OvokErrorDetails.type

final String? type

The problem type URI, https://docs.ovok.com/errors/<code>.

OvokErrorDetails.traceId

final String? traceId

The trace ID from x-trace-id or the body.

OvokErrorDetails.requestId

final String? requestId

The request ID from x-request-id or the body.

OvokErrorDetails.retryAfterMs

final int? retryAfterMs

How long to wait before retrying, from Retry-After or the body.

OvokErrorDetails.fieldErrors

final List<OvokFieldError> fieldErrors

The fields the server rejected.

OvokException

class OvokException implements Exception

Every failure the SDK reports; catch a subclass to handle one case.

Constructors

OvokException.new

OvokException(OvokErrorDetails details, {Object? cause})

Creates an exception from details; cause is the underlying error, if any.

ParameterTypeKindDefault
detailsOvokErrorDetailspositional
causeObject?named

Properties

OvokException.message

final String message

A human-readable description of the failure.

OvokException.status

final int? status

The HTTP status; null when no response arrived.

OvokException.code

final String? code

The condition the server named; null when only the status is known.

OvokException.type

final String? type

The problem type URI, https://docs.ovok.com/errors/<code>.

OvokException.traceId

final String? traceId

Quote it when reporting a problem.

OvokException.requestId

final String? requestId

The request ID from x-request-id or the body.

OvokException.retryAfterMs

final int? retryAfterMs

How long to wait before retrying, from Retry-After or the body.

OvokException.fieldErrors

final List<OvokFieldError> fieldErrors

The fields the server rejected; empty when none were named.

OvokException.cause

final Object? cause

The underlying error, such as a timeout or socket failure.

OvokFieldError

class OvokFieldError

One field the server rejected; path is the field's location, outermost first.

Constructors

OvokFieldError.new

OvokFieldError({
  required String message,
  List<String> path = const [],
  String? code,
  String? validation,
})

Creates a field error; the SDK builds these from error responses.

ParameterTypeKindDefault
messageStringrequired named
pathList<String>namedconst []
codeString?named
validationString?named

Properties

OvokFieldError.message

final String message

Why the field was rejected.

OvokFieldError.path

final List<String> path

The field's location, outermost first; empty when the server named none.

OvokFieldError.code

final String? code

The rejection's code, when the server sent one.

OvokFieldError.validation

final String? validation

The kind of validation that failed, when the server named it.

OvokNotFoundException

class OvokNotFoundException extends OvokException

Constructors

OvokNotFoundException.new

OvokNotFoundException(OvokErrorDetails details, {Object? cause})

Creates the exception from details.

ParameterTypeKindDefault
detailsOvokErrorDetailspositional
causeObject?named

OvokPermissionException

class OvokPermissionException extends OvokException

403: signed in, but not allowed.

Constructors

OvokPermissionException.new

OvokPermissionException(OvokErrorDetails details, {Object? cause})

Creates the exception from details.

ParameterTypeKindDefault
detailsOvokErrorDetailspositional
causeObject?named

OvokRateLimitException

class OvokRateLimitException extends OvokException

Constructors

OvokRateLimitException.new

OvokRateLimitException(OvokErrorDetails details, {Object? cause})

Creates the exception from details.

ParameterTypeKindDefault
detailsOvokErrorDetailspositional
causeObject?named

OvokServiceException

class OvokServiceException extends OvokException

5xx.

Constructors

OvokServiceException.new

OvokServiceException(OvokErrorDetails details, {Object? cause})

Creates the exception from details.

ParameterTypeKindDefault
detailsOvokErrorDetailspositional
causeObject?named

OvokValidationException

class OvokValidationException extends OvokException

400 or 422.

Constructors

OvokValidationException.new

OvokValidationException(OvokErrorDetails details, {Object? cause})

Creates the exception from details.

ParameterTypeKindDefault
detailsOvokErrorDetailspositional
causeObject?named

Last updated on

On this page