Hcs.Grpc.Status
hcs · API reference
A gRPC call result. The code is one of the 17 canonical codes; the optional message is human-readable detail. The status travels in the response trailers as grpc-status (the integer code) and grpc-message (percent-encoded).
type code =
| OK
| 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 (* The canonical gRPC status codes (0..16). *)type t = {
code : code;
message : string option;
}val v : ?message:string -> code -> tv ?message code builds a status.
val ok : tOK with no message.
val is_ok : t -> boolis_ok t is t.code = OK.
val code_to_int : code -> intval code_of_int : int -> code optionval to_int : t -> intval code_to_string : code -> stringThe canonical screaming-snake-case name, e.g. NOT_FOUND.