# Google.LongRunning - Class OperationFailedException (3.5.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [3.5.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationFailedException)
- [3.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/3.4.0/Google.LongRunning.OperationFailedException)
- [3.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/3.3.0/Google.LongRunning.OperationFailedException)
- [3.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/3.2.0/Google.LongRunning.OperationFailedException)
- [3.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/3.1.0/Google.LongRunning.OperationFailedException)
- [3.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/3.0.0/Google.LongRunning.OperationFailedException)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/2.3.0/Google.LongRunning.OperationFailedException)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/2.2.0/Google.LongRunning.OperationFailedException)

    public class OperationFailedException : Exception, ISerializable

Reference documentation and code samples for the Google.LongRunning class OperationFailedException.

An exception to indicate that a long-running operation failed.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [Exception](https://learn.microsoft.com/dotnet/api/system.exception) \> OperationFailedException

## Implements

[ISerializable](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable)

## Inherited Members

[Exception.GetBaseException()](https://learn.microsoft.com/dotnet/api/system.exception.getbaseexception) [Exception.GetObjectData(SerializationInfo, StreamingContext)](https://learn.microsoft.com/dotnet/api/system.exception.getobjectdata) [Exception.GetType()](https://learn.microsoft.com/dotnet/api/system.exception.gettype) [Exception.ToString()](https://learn.microsoft.com/dotnet/api/system.exception.tostring) [Exception.Data](https://learn.microsoft.com/dotnet/api/system.exception.data) [Exception.HelpLink](https://learn.microsoft.com/dotnet/api/system.exception.helplink) [Exception.HResult](https://learn.microsoft.com/dotnet/api/system.exception.hresult) [Exception.InnerException](https://learn.microsoft.com/dotnet/api/system.exception.innerexception) [Exception.Message](https://learn.microsoft.com/dotnet/api/system.exception.message) [Exception.Source](https://learn.microsoft.com/dotnet/api/system.exception.source) [Exception.StackTrace](https://learn.microsoft.com/dotnet/api/system.exception.stacktrace) [Exception.TargetSite](https://learn.microsoft.com/dotnet/api/system.exception.targetsite) [Exception.SerializeObjectState](https://learn.microsoft.com/dotnet/api/system.exception.serializeobjectstate) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Namespace

[Google.LongRunning](https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning)

## Assembly

Google.LongRunning.dll

## Constructors

### OperationFailedException(Operation)

    public OperationFailedException(Operation operation)

Constructs an exception based on a protobuf message representing a failed operation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `operation` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation` The failed operation. Must not be null, and must have an error. |

## Properties

### Operation

    public Operation Operation { get; }

The operation message containing the original error.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation` |   |

### Status

    public Status Status { get; }

The status message within the operation's error field.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Status.html` |   |