FirebaseMlException

class FirebaseMlException : FirebaseException


Represents an Exception resulting from an operation on a FirebaseModelDownloader. Error mappings should remain consistent with the original firebase_ml_sdk whenever possible.

Summary

Nested types

@IntDef(value = )
@Retention(value = RetentionPolicy.CLASS)
annotation FirebaseMlException.Code

The set of Firebase ML status codes.

Constants

const Int
ABORTED = 10

The operation was aborted, typically due to a concurrency issue like transaction aborts, etc.

const Int

Some resource that we attempted to create already exists.

const Int

The operation was cancelled (typically by the caller).

const Int

Deadline expired before operation could complete.

const Int

The download URL expired before download could complete.

const Int

Operation was rejected because the system is not in a state required for the operation's execution.

const Int

Internal errors.

const Int

Client specified an invalid argument.

const Int

The downloaded model's hash doesn't match the expected value.

const Int

There is not enough space left on the device.

const Int

Some requested resource was not found.

const Int

There is no network connection.

const Int

Operation was attempted past the valid range.

const Int

The caller does not have permission to execute the specified operation.

const Int

Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.

const Int

The request does not have valid authentication credentials for the operation.

const Int

The service is currently unavailable.

const Int

Operation is not implemented or not supported/enabled.

const Int

Unknown error or an error from a different error domain.

Public properties

Int

Constants

ABORTED

const val ABORTED = 10: Int

The operation was aborted, typically due to a concurrency issue like transaction aborts, etc.

ALREADY_EXISTS

const val ALREADY_EXISTS = 6: Int

Some resource that we attempted to create already exists.

CANCELLED

const val CANCELLED = 1: Int

The operation was cancelled (typically by the caller).

DEADLINE_EXCEEDED

const val DEADLINE_EXCEEDED = 4: Int

Deadline expired before operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire.

DOWNLOAD_URL_EXPIRED

const val DOWNLOAD_URL_EXPIRED = 121: Int

The download URL expired before download could complete. Usually, multiple download attempts will be performed before this is returned.

FAILED_PRECONDITION

const val FAILED_PRECONDITION = 9: Int

Operation was rejected because the system is not in a state required for the operation's execution.

INTERNAL

const val INTERNAL = 13: Int

Internal errors. Means some invariant expected by underlying system has been broken. If you see one of these errors, something is very broken.

INVALID_ARGUMENT

const val INVALID_ARGUMENT = 3: Int

Client specified an invalid argument. Note that this differs from FAILED_PRECONDITION . INVALID_ARGUMENT indicates arguments that are problematic regardless of the state of the system (for example, an invalid field name).

MODEL_HASH_MISMATCH

const val MODEL_HASH_MISMATCH = 102: Int

The downloaded model's hash doesn't match the expected value.

NOT_ENOUGH_SPACE

const val NOT_ENOUGH_SPACE = 101: Int

There is not enough space left on the device.

NOT_FOUND

const val NOT_FOUND = 5: Int

Some requested resource was not found.

NO_NETWORK_CONNECTION

const val NO_NETWORK_CONNECTION = 17: Int

There is no network connection.

OUT_OF_RANGE

const val OUT_OF_RANGE = 11: Int

Operation was attempted past the valid range.

PERMISSION_DENIED

const val PERMISSION_DENIED = 7: Int

The caller does not have permission to execute the specified operation.

RESOURCE_EXHAUSTED

const val RESOURCE_EXHAUSTED = 8: Int

Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.

UNAUTHENTICATED

const val UNAUTHENTICATED = 16: Int

The request does not have valid authentication credentials for the operation.

UNAVAILABLE

const val UNAVAILABLE = 14: Int

The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff.

In ML Model Downloader, this error is mostly about the models being not available yet.

UNIMPLEMENTED

const val UNIMPLEMENTED = 12: Int

Operation is not implemented or not supported/enabled.

UNKNOWN

const val UNKNOWN = 2: Int

Unknown error or an error from a different error domain.

Public properties