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 OvokExceptionConstructors
OvokAuthenticationException.new
OvokAuthenticationException(OvokErrorDetails details, {Object? cause})Creates the exception from details.
| Parameter | Type | Kind | Default |
|---|---|---|---|
details | OvokErrorDetails | positional | |
cause | Object? | named |
OvokConfigException
class OvokConfigException extends OvokExceptionA bad option, or an action this client cannot take.
Constructors
OvokConfigException.new
OvokConfigException(OvokErrorDetails details, {Object? cause})Creates the exception from details.
| Parameter | Type | Kind | Default |
|---|---|---|---|
details | OvokErrorDetails | positional | |
cause | Object? | named |
OvokConflictException
class OvokConflictException extends OvokExceptionConstructors
OvokConflictException.new
OvokConflictException(OvokErrorDetails details, {Object? cause})Creates the exception from details.
| Parameter | Type | Kind | Default |
|---|---|---|---|
details | OvokErrorDetails | positional | |
cause | Object? | named |
OvokConnectionException
class OvokConnectionException extends OvokExceptionNo answer: a network failure or a timeout.
Constructors
OvokConnectionException.new
OvokConnectionException(OvokErrorDetails details, {Object? cause})Creates the exception from details.
| Parameter | Type | Kind | Default |
|---|---|---|---|
details | OvokErrorDetails | positional | |
cause | Object? | named |
OvokErrorDetails
class OvokErrorDetailsWhat 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.
| Parameter | Type | Kind | Default |
|---|---|---|---|
message | String | required named | |
status | int? | named | |
code | String? | named | |
type | String? | named | |
traceId | String? | named | |
requestId | String? | named | |
retryAfterMs | int? | named | |
fieldErrors | List<OvokFieldError> | named | const [] |
Properties
OvokErrorDetails.message
final String messageA human-readable description of the failure.
OvokErrorDetails.status
final int? statusThe HTTP status; null when no response arrived.
OvokErrorDetails.code
final String? codeThe condition the server named; null when only the status is known.
OvokErrorDetails.type
final String? typeThe problem type URI, https://docs.ovok.com/errors/<code>.
OvokErrorDetails.traceId
final String? traceIdThe trace ID from x-trace-id or the body.
OvokErrorDetails.requestId
final String? requestIdThe request ID from x-request-id or the body.
OvokErrorDetails.retryAfterMs
final int? retryAfterMsHow long to wait before retrying, from Retry-After or the body.
OvokErrorDetails.fieldErrors
final List<OvokFieldError> fieldErrorsThe fields the server rejected.
OvokException
class OvokException implements ExceptionEvery 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.
| Parameter | Type | Kind | Default |
|---|---|---|---|
details | OvokErrorDetails | positional | |
cause | Object? | named |
Properties
OvokException.message
final String messageA human-readable description of the failure.
OvokException.status
final int? statusThe HTTP status; null when no response arrived.
OvokException.code
final String? codeThe condition the server named; null when only the status is known.
OvokException.type
final String? typeThe problem type URI, https://docs.ovok.com/errors/<code>.
OvokException.traceId
final String? traceIdQuote it when reporting a problem.
OvokException.requestId
final String? requestIdThe request ID from x-request-id or the body.
OvokException.retryAfterMs
final int? retryAfterMsHow long to wait before retrying, from Retry-After or the body.
OvokException.fieldErrors
final List<OvokFieldError> fieldErrorsThe fields the server rejected; empty when none were named.
OvokException.cause
final Object? causeThe underlying error, such as a timeout or socket failure.
OvokFieldError
class OvokFieldErrorOne 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.
| Parameter | Type | Kind | Default |
|---|---|---|---|
message | String | required named | |
path | List<String> | named | const [] |
code | String? | named | |
validation | String? | named |
Properties
OvokFieldError.message
final String messageWhy the field was rejected.
OvokFieldError.path
final List<String> pathThe field's location, outermost first; empty when the server named none.
OvokFieldError.code
final String? codeThe rejection's code, when the server sent one.
OvokFieldError.validation
final String? validationThe kind of validation that failed, when the server named it.
OvokNotFoundException
class OvokNotFoundException extends OvokExceptionConstructors
OvokNotFoundException.new
OvokNotFoundException(OvokErrorDetails details, {Object? cause})Creates the exception from details.
| Parameter | Type | Kind | Default |
|---|---|---|---|
details | OvokErrorDetails | positional | |
cause | Object? | named |
OvokPermissionException
class OvokPermissionException extends OvokException403: signed in, but not allowed.
Constructors
OvokPermissionException.new
OvokPermissionException(OvokErrorDetails details, {Object? cause})Creates the exception from details.
| Parameter | Type | Kind | Default |
|---|---|---|---|
details | OvokErrorDetails | positional | |
cause | Object? | named |
OvokRateLimitException
class OvokRateLimitException extends OvokExceptionConstructors
OvokRateLimitException.new
OvokRateLimitException(OvokErrorDetails details, {Object? cause})Creates the exception from details.
| Parameter | Type | Kind | Default |
|---|---|---|---|
details | OvokErrorDetails | positional | |
cause | Object? | named |
OvokServiceException
class OvokServiceException extends OvokException5xx.
Constructors
OvokServiceException.new
OvokServiceException(OvokErrorDetails details, {Object? cause})Creates the exception from details.
| Parameter | Type | Kind | Default |
|---|---|---|---|
details | OvokErrorDetails | positional | |
cause | Object? | named |
OvokValidationException
class OvokValidationException extends OvokException400 or 422.
Constructors
OvokValidationException.new
OvokValidationException(OvokErrorDetails details, {Object? cause})Creates the exception from details.
| Parameter | Type | Kind | Default |
|---|---|---|---|
details | OvokErrorDetails | positional | |
cause | Object? | named |
Last updated on