Code class
The canonical error codes for gRPC APIs.
Sometimes multiple error codes may apply. Services should return
the most specific error code that applies. For example, prefer
OUT_OF_RANGE
over FAILED_PRECONDITION
if both codes apply.
Similarly prefer NOT_FOUND
or ALREADY_EXISTS
over FAILED_PRECONDITION
.
- Inheritance
-
- Object
- ProtobufEnum
- Code
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
This enum's name, as specified in the .proto file.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → int
-
This enum's integer value, as specified in the .proto file.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns this enum's
name
or thevalue
if names are not represented.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- ABORTED → const Code
- ALREADY_EXISTS → const Code
- CANCELLED → const Code
- DATA_LOSS → const Code
- DEADLINE_EXCEEDED → const Code
- FAILED_PRECONDITION → const Code
- INTERNAL → const Code
- INVALID_ARGUMENT → const Code
- NOT_FOUND → const Code
- OK → const Code
- OUT_OF_RANGE → const Code
- PERMISSION_DENIED → const Code
- RESOURCE_EXHAUSTED → const Code
- UNAUTHENTICATED → const Code
- UNAVAILABLE → const Code
- UNIMPLEMENTED → const Code
- UNKNOWN → const Code
-
values
→ const List<
Code>