> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SuperOffice.WebApi.Authorization.Exceptions.SuperOfficeWebApiException

# <a id="SuperOffice_WebApi_Authorization_Exceptions_SuperOfficeWebApiException" /> Class SuperOfficeWebApiException

Namespace: [SuperOffice.WebApi.Authorization.Exceptions](SuperOffice.WebApi.Authorization.Exceptions.md)\
Assembly: SuperOffice.WebApi.Authorization.dll

Thrown when bad things happen in the API. Contains the HTTP error and any body we can read.

```csharp theme={null}
public class SuperOfficeWebApiException : Exception, ISerializable
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[Exception](https://learn.microsoft.com/dotnet/api/system.exception) ←
[SuperOfficeWebApiException](SuperOffice.WebApi.Authorization.Exceptions.SuperOfficeWebApiException.md)

#### Derived

[SuperOfficeWebApiUnauthorizedException](SuperOffice.WebApi.Authorization.Exceptions.SuperOfficeWebApiUnauthorizedException.md),
[SuperOfficeWebApiWrongSubdomainException](SuperOffice.WebApi.Authorization.Exceptions.SuperOfficeWebApiWrongSubdomainException.md)

#### 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.ToString()](https://learn.microsoft.com/dotnet/api/system.exception.tostring),
[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.Message](https://learn.microsoft.com/dotnet/api/system.exception.message),
[Exception.Data](https://learn.microsoft.com/dotnet/api/system.exception.data),
[Exception.InnerException](https://learn.microsoft.com/dotnet/api/system.exception.innerexception),
[Exception.TargetSite](https://learn.microsoft.com/dotnet/api/system.exception.targetsite),
[Exception.StackTrace](https://learn.microsoft.com/dotnet/api/system.exception.stacktrace),
[Exception.HelpLink](https://learn.microsoft.com/dotnet/api/system.exception.helplink),
[Exception.Source](https://learn.microsoft.com/dotnet/api/system.exception.source),
[Exception.HResult](https://learn.microsoft.com/dotnet/api/system.exception.hresult),
[Exception.SerializeObjectState](https://learn.microsoft.com/dotnet/api/system.exception.serializeobjectstate),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Constructors

### <a id="SuperOffice_WebApi_Authorization_Exceptions_SuperOfficeWebApiException__ctor" /> SuperOfficeWebApiException()

Default - all blank

```csharp theme={null}
public SuperOfficeWebApiException()
```

### <a id="SuperOffice_WebApi_Authorization_Exceptions_SuperOfficeWebApiException__ctor_System_String_" /> SuperOfficeWebApiException(string)

Message

```csharp theme={null}
public SuperOfficeWebApiException(string message)
```

#### Parameters

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

"halp!"

### <a id="SuperOffice_WebApi_Authorization_Exceptions_SuperOfficeWebApiException__ctor_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_" /> SuperOfficeWebApiException(SerializationInfo, StreamingContext)

Mandatory constructor to support <xref href="System.SerializableAttribute" data-throw-if-not-resolved="false" /> ]

```csharp theme={null}
public SuperOfficeWebApiException(SerializationInfo info, StreamingContext context)
```

#### Parameters

`info` [SerializationInfo](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.serializationinfo)

`context` [StreamingContext](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.streamingcontext)

### <a id="SuperOffice_WebApi_Authorization_Exceptions_SuperOfficeWebApiException__ctor_System_String_System_Exception_" /> SuperOfficeWebApiException(string, Exception)

Wrapper

```csharp theme={null}
public SuperOfficeWebApiException(string message, Exception innerException)
```

#### Parameters

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

"Halp!"

`innerException` [Exception](https://learn.microsoft.com/dotnet/api/system.exception)

the real problem

### <a id="SuperOffice_WebApi_Authorization_Exceptions_SuperOfficeWebApiException__ctor_System_String_System_String_System_Net_Http_Headers_HttpResponseHeaders_System_String_" /> SuperOfficeWebApiException(string, string, HttpResponseHeaders, string)

Details

```csharp theme={null}
public SuperOfficeWebApiException(string message, string request, HttpResponseHeaders headers, string body)
```

#### Parameters

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

"Halp!"

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

HTTP Request that triggered problem

`headers` [HttpResponseHeaders](https://learn.microsoft.com/dotnet/api/system.net.http.headers.httpresponseheaders)

HTTP Response headers from failed request. Might contain clues.

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

body (if any) of response. Might contain JSON

## Properties

### <a id="SuperOffice_WebApi_Authorization_Exceptions_SuperOfficeWebApiException_Body" /> Body

```csharp theme={null}
public string Body { get; }
```

#### Property Value

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

### <a id="SuperOffice_WebApi_Authorization_Exceptions_SuperOfficeWebApiException_Headers" /> Headers

```csharp theme={null}
public HttpResponseHeaders Headers { get; }
```

#### Property Value

[HttpResponseHeaders](https://learn.microsoft.com/dotnet/api/system.net.http.headers.httpresponseheaders)

### <a id="SuperOffice_WebApi_Authorization_Exceptions_SuperOfficeWebApiException_Request" /> Request

```csharp theme={null}
public string Request { get; }
```

#### Property Value

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


## Related topics

- [SuperOffice.WebApi.Authorization.Exceptions.SuperOfficeWebApiUnauthorizedException](/en/api/reference/webapi/SuperOffice.WebApi.Authorization.Exceptions.SuperOfficeWebApiUnauthorizedException.md)
- [SuperOffice.WebApi.Authorization.Exceptions.SuperOfficeWebApiWrongSubdomainException](/en/api/reference/webapi/SuperOffice.WebApi.Authorization.Exceptions.SuperOfficeWebApiWrongSubdomainException.md)
- [SuperOffice.WebApi.Authorization.Exceptions](/en/api/reference/webapi/SuperOffice.WebApi.Authorization.Exceptions.md)
- [SuperOffice.WebApi.ProgressListener](/en/api/reference/webapi/SuperOffice.WebApi.ProgressListener.md)
- [SuperOffice.WebApi.Authorization.SystemUserTicket.Exceptions.SystemUserException](/en/api/reference/webapi/SuperOffice.WebApi.Authorization.SystemUserTicket.Exceptions.SystemUserException.md)
- [SuperOffice.WebApi.Authorization.SystemUserTicket.Exceptions](/en/api/reference/webapi/SuperOffice.WebApi.Authorization.SystemUserTicket.Exceptions.md)
