@aster-rpc/aster API Reference
    Preparing search index...

    Variable StatusCodeConst

    StatusCode: {
        OK: 0;
        CANCELLED: 1;
        UNKNOWN: 2;
        INVALID_ARGUMENT: 3;
        DEADLINE_EXCEEDED: 4;
        NOT_FOUND: 5;
        ALREADY_EXISTS: 6;
        PERMISSION_DENIED: 7;
        RESOURCE_EXHAUSTED: 8;
        FAILED_PRECONDITION: 9;
        ABORTED: 10;
        OUT_OF_RANGE: 11;
        UNIMPLEMENTED: 12;
        INTERNAL: 13;
        UNAVAILABLE: 14;
        DATA_LOSS: 15;
        UNAUTHENTICATED: 16;
        CONTRACT_VIOLATION: 101;
    } = ...

    Aster RPC status codes and error hierarchy.

    Spec reference: S6.5 (status codes).

    Codes 0-16 mirror gRPC's google.rpc.Code semantically. Codes 100+ are Aster-native and have no gRPC equivalent. The 17-99 range is reserved as a buffer in case gRPC ever extends its enum.

    A common gripe with gRPC's status codes is that there are too few to express the variety of failures real services actually hit. The 100+ space gives Aster room to mint more precise codes over time, signalling clearly that they are intentionally separate from the gRPC vocabulary.

    Type Declaration

    • ReadonlyOK: 0
    • ReadonlyCANCELLED: 1
    • ReadonlyUNKNOWN: 2
    • ReadonlyINVALID_ARGUMENT: 3
    • ReadonlyDEADLINE_EXCEEDED: 4
    • ReadonlyNOT_FOUND: 5
    • ReadonlyALREADY_EXISTS: 6
    • ReadonlyPERMISSION_DENIED: 7
    • ReadonlyRESOURCE_EXHAUSTED: 8
    • ReadonlyFAILED_PRECONDITION: 9
    • ReadonlyABORTED: 10
    • ReadonlyOUT_OF_RANGE: 11
    • ReadonlyUNIMPLEMENTED: 12
    • ReadonlyINTERNAL: 13
    • ReadonlyUNAVAILABLE: 14
    • ReadonlyDATA_LOSS: 15
    • ReadonlyUNAUTHENTICATED: 16
    • ReadonlyCONTRACT_VIOLATION: 101

      The wire payload doesn't match the published contract: e.g. the JSON dict has fields the receiver's @WireType class doesn't declare, or vice versa. Distinct from INVALID_ARGUMENT because the violation is about data SHAPE, not value, and shape violations can occur at any nesting depth (a top-level INVALID_ARGUMENT label doesn't apply when the bad field is two objects deep). The producer owns the contract; consumers must use the field names defined by the producer's manifest.