StatusCodes enum

Exception thrown for errors encountered during Genkit flow operations. Common status codes for Genkit operations.

These correspond to gRPC status codes.

Inheritance
Available extensions

Values

OK → const StatusCodes

The operation completed successfully.

const StatusCodes(0)
CANCELLED → const StatusCodes

The operation was cancelled, typically by the caller.

const StatusCodes(1)
UNKNOWN → const StatusCodes

Unknown error.

const StatusCodes(2)
INVALID_ARGUMENT → const StatusCodes

The client specified an invalid argument.

const StatusCodes(3)
DEADLINE_EXCEEDED → const StatusCodes

The deadline expired before the operation could complete.

const StatusCodes(4)
NOT_FOUND → const StatusCodes

Some requested entity (e.g., file or directory) was not found.

const StatusCodes(5)
ALREADY_EXISTS → const StatusCodes

The entity that a client attempted to create (e.g., file or directory) already exists.

const StatusCodes(6)
PERMISSION_DENIED → const StatusCodes

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

const StatusCodes(7)
UNAUTHENTICATED → const StatusCodes

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

const StatusCodes(16)
RESOURCE_EXHAUSTED → const StatusCodes

Some resource has been exhausted, perhaps a per-user quota.

const StatusCodes(8)
FAILED_PRECONDITION → const StatusCodes

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

const StatusCodes(9)
ABORTED → const StatusCodes

The operation was aborted, typically due to a concurrency issue.

const StatusCodes(10)
OUT_OF_RANGE → const StatusCodes

The operation was attempted past the valid range.

const StatusCodes(11)
UNIMPLEMENTED → const StatusCodes

The operation is not implemented or is not supported/enabled.

const StatusCodes(12)
INTERNAL → const StatusCodes

Internal errors.

const StatusCodes(13)
UNAVAILABLE → const StatusCodes

The service is currently unavailable.

const StatusCodes(14)
DATA_LOSS → const StatusCodes

Unrecoverable data loss or corruption.

const StatusCodes(15)

Properties

hashCode int
The hash code for this object.
no setterinherited
httpStatus int
no setter
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromHttpStatus(int code) StatusCodes
Maps an HTTP status code to the closest StatusCodes value.

Constants

values → const List<StatusCodes>
A constant List of the values in this enum, in order of their declaration.