Theia API Documentation v1.76.0
    Preparing search index...
    RestResult:
        | { body?: unknown; kind: "success"; status: number }
        | { code: string; details?: string[]; kind: "error"; status: number }

    Result of a typed external API route handler: either a success with a status and an optional JSON body, or an error with a status, a stable, machine-readable error code, and optional human-readable details. Results are written to the HTTP response by the ExternalApiResponseWriter, so that all external API endpoints share one wire format.

    Use the constructor functions of the RestResult namespace to create results.