public Status(StatusCode statusCode, string detail, Exception? debugException)
Creates a new instance ofStatus.
Users should not use this constructor, except for creating instances for testing.
The debug error string should only be populated by gRPC internals.
Note: experimental API that can change or be removed without any prior notice.
public readonly Exception? DebugException { get; }
In case of an error, this field may contain additional error details to help with debugging.
This field will be only populated on a client and its value is generated locally,
based on the internal state of the gRPC client stack (i.e. the value is never sent over the wire).
Note that this field is available only for debugging purposes, the application logic should
never rely on values of this field (it should useStatusCodeandDetailinstead).
Example: when a client fails to connect to a server, this field may provide additional details
why the connection to the server has failed.
Note: experimental API that can change or be removed without any prior notice.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eStatus\u003c/code\u003e struct represents the result of a Remote Procedure Call (RPC), including a \u003ccode\u003eStatusCode\u003c/code\u003e indicating success or error and an optional detail string.\u003c/p\u003e\n"],["\u003cp\u003eConstructors for the \u003ccode\u003eStatus\u003c/code\u003e struct allow creation with a \u003ccode\u003eStatusCode\u003c/code\u003e and detail, and an additional constructor is available for internal use and testing, which includes a debug \u003ccode\u003eException\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDefaultCancelled\u003c/code\u003e and \u003ccode\u003eDefaultSuccess\u003c/code\u003e are static fields that represent the default outcomes for cancelled and successful RPCs, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDebugException\u003c/code\u003e property may provide additional error details to help with debugging, but it is only meant for debugging purposes and not for core application logic.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eStatus\u003c/code\u003e struct include \u003ccode\u003eStatusCode\u003c/code\u003e (indicating the gRPC status code), \u003ccode\u003eDetail\u003c/code\u003e (containing additional details), and the optional \u003ccode\u003eDebugException\u003c/code\u003e for error details.\u003c/p\u003e\n"]]],[],null,["# Struct Status (2.66.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.66.0 (latest)](/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Status)\n- [2.63.0](/dotnet/docs/reference/Grpc.Core/2.63.0/Grpc.Core.Status)\n- [2.48.0](/dotnet/docs/reference/Grpc.Core/2.48.0/Grpc.Core.Status) \n\n public struct Status\n\nRepresents RPC result, which consists of [StatusCode](/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Status#Grpc_Core_Status_StatusCode) and an optional detail string. \n\nInherited Members\n-----------------\n\n[ValueType.Equals(object)](https://learn.microsoft.com/dotnet/api/system.valuetype.equals) \n[ValueType.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.valuetype.gethashcode) \n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)\n\nNamespace\n---------\n\n[Grpc.Core](/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core)\n\nAssembly\n--------\n\nGrpc.Core.Api.dll\n\nConstructors\n------------\n\n### Status(StatusCode, string)\n\n public Status(StatusCode statusCode, string detail)\n\nCreates a new instance of `Status`.\n\n### Status(StatusCode, string, Exception?)\n\n public Status(StatusCode statusCode, string detail, Exception? debugException)\n\nCreates a new instance of `Status`.\nUsers should not use this constructor, except for creating instances for testing.\nThe debug error string should only be populated by gRPC internals.\nNote: experimental API that can change or be removed without any prior notice.\n\nFields\n------\n\n### DefaultCancelled\n\n public static readonly Status DefaultCancelled\n\nDefault result of a cancelled RPC. StatusCode=Cancelled, empty details message.\n\n### DefaultSuccess\n\n public static readonly Status DefaultSuccess\n\nDefault result of a successful RPC. StatusCode=OK, empty details message.\n\nProperties\n----------\n\n### DebugException\n\n public readonly Exception? DebugException { get; }\n\nIn case of an error, this field may contain additional error details to help with debugging.\nThis field will be only populated on a client and its value is generated locally,\nbased on the internal state of the gRPC client stack (i.e. the value is never sent over the wire).\nNote that this field is available only for debugging purposes, the application logic should\nnever rely on values of this field (it should use `StatusCode` and `Detail` instead).\nExample: when a client fails to connect to a server, this field may provide additional details\nwhy the connection to the server has failed.\nNote: experimental API that can change or be removed without any prior notice.\n\n### Detail\n\n public readonly string Detail { get; }\n\nGets the detail.\n\n### StatusCode\n\n public readonly StatusCode StatusCode { get; }\n\nGets the gRPC status code. OK indicates success, all other values indicate an error.\n\nMethods\n-------\n\n### ToString()\n\n public override string ToString()\n\nReturns a [string](https://learn.microsoft.com/dotnet/api/system.string) that represents the current [Status](/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Status).\n\n**Overrides** \n[ValueType.ToString()](https://learn.microsoft.com/dotnet/api/system.valuetype.tostring)"]]