# `TrogonProto.Error.V1Alpha1.Code`
[🔗](https://github.com/straw-hat-team/beam-monorepo/blob/trogon_proto@v0.13.1/apps/trogon_proto/lib/__generated__/trogon/error/v1alpha1/code.pb.ex#L1)

The canonical error codes for gRPC APIs.

This enum mirrors the error values from `google.rpc.Code` so typed error
templates can point at the canonical Google RPC error space without
importing `google.rpc`.

`OK` is intentionally omitted because this enum is used only for errors.

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`.

Source:
https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto

# `t`

```elixir
@type t() ::
  integer()
  | :UNSPECIFIED
  | :CANCELLED
  | :UNKNOWN
  | :INVALID_ARGUMENT
  | :DEADLINE_EXCEEDED
  | :NOT_FOUND
  | :ALREADY_EXISTS
  | :PERMISSION_DENIED
  | :RESOURCE_EXHAUSTED
  | :FAILED_PRECONDITION
  | :ABORTED
  | :OUT_OF_RANGE
  | :UNIMPLEMENTED
  | :INTERNAL
  | :UNAVAILABLE
  | :DATA_LOSS
  | :UNAUTHENTICATED
```

# `descriptor`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
