[[["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\u003eGoogleApiException\u003c/code\u003e class represents an exception thrown by an API Service, inheriting from the \u003ccode\u003eException\u003c/code\u003e class and implementing \u003ccode\u003eISerializable\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis exception provides properties like \u003ccode\u003eError\u003c/code\u003e, \u003ccode\u003eHttpStatusCode\u003c/code\u003e, and \u003ccode\u003eMessage\u003c/code\u003e to convey details about the API error encountered.\u003c/p\u003e\n"],["\u003cp\u003eYou can create a \u003ccode\u003eGoogleApiException\u003c/code\u003e with a service name, a message, and/or an inner exception to provide context and specifics about the error.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eServiceName\u003c/code\u003e property allows you to identify the specific service associated with the exception, while the \u003ccode\u003eToString()\u003c/code\u003e method provides a summarized view of the exception.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this class is 1.69.0, with other versions such as 1.68.0, 1.60.0, 1.59.0, 1.55.0, and 1.50.0 also being documented.\u003c/p\u003e\n"]]],[],null,["# Class GoogleApiException (1.69.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.69.0 (latest)](/dotnet/docs/reference/Google.Apis/latest/Google.GoogleApiException)\n- [1.68.0](/dotnet/docs/reference/Google.Apis/1.68.0/Google.GoogleApiException)\n- [1.60.0](/dotnet/docs/reference/Google.Apis/1.60.0/Google.GoogleApiException)\n- [1.59.0](/dotnet/docs/reference/Google.Apis/1.59.0/Google.GoogleApiException)\n- [1.55.0](/dotnet/docs/reference/Google.Apis/1.55.0/Google.GoogleApiException)\n- [1.50.0](/dotnet/docs/reference/Google.Apis/1.50.0/Google.GoogleApiException) \n\n public class GoogleApiException : Exception, ISerializable\n\nRepresents an exception thrown by an API Service. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e [Exception](https://learn.microsoft.com/dotnet/api/system.exception) \\\u003e GoogleApiException \n\nImplements\n----------\n\n[ISerializable](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable) \n\nInherited Members\n-----------------\n\n[Exception.GetBaseException()](https://learn.microsoft.com/dotnet/api/system.exception.getbaseexception) \n[Exception.GetObjectData(SerializationInfo, StreamingContext)](https://learn.microsoft.com/dotnet/api/system.exception.getobjectdata) \n[Exception.GetType()](https://learn.microsoft.com/dotnet/api/system.exception.gettype) \n[Exception.Data](https://learn.microsoft.com/dotnet/api/system.exception.data) \n[Exception.HelpLink](https://learn.microsoft.com/dotnet/api/system.exception.helplink) \n[Exception.HResult](https://learn.microsoft.com/dotnet/api/system.exception.hresult) \n[Exception.InnerException](https://learn.microsoft.com/dotnet/api/system.exception.innerexception) \n[Exception.Source](https://learn.microsoft.com/dotnet/api/system.exception.source) \n[Exception.StackTrace](https://learn.microsoft.com/dotnet/api/system.exception.stacktrace) \n[Exception.TargetSite](https://learn.microsoft.com/dotnet/api/system.exception.targetsite) \n[Exception.SerializeObjectState](https://learn.microsoft.com/dotnet/api/system.exception.serializeobjectstate) \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) \n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)\n\nNamespace\n---------\n\n[Google](/dotnet/docs/reference/Google.Apis/latest/Google)\n\nAssembly\n--------\n\nGoogle.Apis.Core.dll\n\nConstructors\n------------\n\n### GoogleApiException(string)\n\n public GoogleApiException(string serviceName)\n\nCreates an API Service exception with no message.\n\n**Remarks** \n[Message](/dotnet/docs/reference/Google.Apis/latest/Google.GoogleApiException#Google_GoogleApiException_Message) may still contain useful information if the\n[Error](/dotnet/docs/reference/Google.Apis/latest/Google.GoogleApiException#Google_GoogleApiException_Error) and/or [HttpStatusCode](/dotnet/docs/reference/Google.Apis/latest/Google.GoogleApiException#Google_GoogleApiException_HttpStatusCode) properties are set.\n\n### GoogleApiException(string, string)\n\n public GoogleApiException(string serviceName, string message)\n\nCreates an API Service exception.\n\n### GoogleApiException(string, string, Exception)\n\n public GoogleApiException(string serviceName, string message, Exception inner)\n\nCreates an API Service exception.\n\nProperties\n----------\n\n### Error\n\n public RequestError Error { get; set; }\n\nThe Error which was returned from the server, or `null` if unavailable.\n\n### HttpStatusCode\n\n public HttpStatusCode HttpStatusCode { get; set; }\n\nThe HTTP status code which was returned along with this error, or 0 if unavailable.\n\n### Message\n\n public override string Message { get; }\n\n**Overrides** \n[Exception.Message](https://learn.microsoft.com/dotnet/api/system.exception.message)\n\n### ServiceName\n\n public string ServiceName { get; }\n\nGets the service name which related to this exception.\n\nMethods\n-------\n\n### ToString()\n\n public override string ToString()\n\nReturns a summary of this exception.\n\n**Overrides** \n[Exception.ToString()](https://learn.microsoft.com/dotnet/api/system.exception.tostring)\n\nExtension Method\n----------------\n\n[Utilities.ThrowIfNull\\\u003cT\\\u003e(T, string)](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Utilities#Google_Apis_Util_Utilities_ThrowIfNull__1___0_System_String_)"]]