papi-dts
    Preparing search index...

    Function getJsonRpcRequestErrorMessagePrefix

    • Experimental

      Builds the exact prefix that network.service's doRequest embeds in the message it throws for a JSON-RPC error response with the given code — the full thrown message is this prefix followed by : <error message>.

      Exported so the few callers that must classify these thrown errors by message (there is no richer machine-readable marker for a "method not found" response) derive the format from this single producer instead of hand-copying the literal. Hand-copied copies silently drift: reformat the producer and a separate matcher/fixture keeps matching its old string while real errors stop matching, and the tests stay green. Everything routing through this function stays in lockstep.

      Parameters

      • code: number

        The JSON-RPC error code from the error response being classified

      Returns string

      The exact message prefix doRequest uses for an error response with that code