Class GoogleApiException (1.73.0)

public class GoogleApiException : Exception, ISerializable

Represents an exception thrown by an API Service.

Inherited Members

Namespace

Google

Assembly

Google.Apis.Core.dll

Constructors

GoogleApiException(string)

public GoogleApiException(string serviceName)

Creates an API Service exception with no message.

Parameter
Name Description
serviceName string
Remarks

GoogleApiException(string, string)

public GoogleApiException(string serviceName, string message)

Creates an API Service exception.

Parameters
Name Description
serviceName string
message string

GoogleApiException(string, string, Exception)

public GoogleApiException(string serviceName, string message, Exception inner)

Creates an API Service exception.

Parameters
Name Description
serviceName string
message string
inner Exception

Properties

Error

public RequestError Error { get; set; }

The Error which was returned from the server, or null if unavailable.

Property Value
Type Description
RequestError

HttpStatusCode

public HttpStatusCode HttpStatusCode { get; set; }

The HTTP status code which was returned along with this error, or 0 if unavailable.

Property Value
Type Description
HttpStatusCode

Message

public override string Message { get; }
Property Value
Type Description
string
Overrides

ServiceName

public string ServiceName { get; }

Gets the service name which related to this exception.

Property Value
Type Description
string

Methods

ToString()

public override string ToString()

Returns a summary of this exception.

Returns
Type Description
string

A summary of this exception.

Overrides

Extension Method

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-10 UTC.