---
title: "RestPkiException"
description: "Namespace: Lacuna.RestPki.Client"
canonical: "https://docs.lacunasoftware.com/api/Lacuna.RestPki.Client/RestPkiException"
locale: "pt-BR"
product: "PKI SDK"
last_updated: "2026-06-02"
---

# RestPkiException

**Namespace:** `Lacuna.RestPki.Client`  
**Assembly:** `Lacuna.RestPki.Client`  
_Class_

```csharp
public class RestPkiException : RestException
```

**Hierarquia:** [`object`](https://learn.microsoft.com/dotnet/api/system.object) → `RestPkiException`

## Construtores

### `RestPkiException(HttpMethod, Uri, ErrorCodes, string)`

```csharp
[Obsolete("Use RestPkiException(HttpMethod, Uri, ErrorModel) instead")]
public RestPkiException(HttpMethod verb, Uri uri, ErrorCodes errorCode, string detail = null)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `verb` | [`HttpMethod`](https://learn.microsoft.com/dotnet/api/system.net.http.httpmethod) |  |
| `uri` | [`Uri`](https://learn.microsoft.com/dotnet/api/system.uri) |  |
| `errorCode` | `ErrorCodes` |  |
| `detail` | [`string`](https://learn.microsoft.com/dotnet/api/system.string) |  |

---

### `RestPkiException(HttpMethod, Uri, ErrorModel)`

```csharp
public RestPkiException(HttpMethod verb, Uri uri, ErrorModel errorModel)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `verb` | [`HttpMethod`](https://learn.microsoft.com/dotnet/api/system.net.http.httpmethod) |  |
| `uri` | [`Uri`](https://learn.microsoft.com/dotnet/api/system.uri) |  |
| `errorModel` | `ErrorModel` |  |

---

## Propriedades

### `Detail`

```csharp
public string Detail { get; }
```

**Retorno**

[`string`](https://learn.microsoft.com/dotnet/api/system.string)

---

### `ErrorCode`

```csharp
public ErrorCodes ErrorCode { get; }
```

**Retorno**

`ErrorCodes`

---

### `ErrorCodeStr`

```csharp
public string ErrorCodeStr { get; }
```

**Retorno**

[`string`](https://learn.microsoft.com/dotnet/api/system.string)

---
