---
title: "Class LayoutServiceGraphQlException"
slug: "sitecore.layoutservice.client.requesthandlers.graphql.layoutservicegraphqlexception"
abstract: ""
---
# Class LayoutServiceGraphQlException

Details an exception that may occur when communicating with the Sitecore layout service.

## Inheritance

System.Object

[SitecoreLayoutServiceClientException](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.layoutservice.client.exceptions.sitecorelayoutserviceclientexception.html)

LayoutServiceGraphQlException

### **Namespace**: Sitecore.LayoutService.Client.RequestHandlers.GraphQL

#### **Assembly**: Sitecore.LayoutService.Client.dll

##### Syntax

```csharp
public class LayoutServiceGraphQlException : SitecoreLayoutServiceClientException

```

### Constructors

#### LayoutServiceGraphQlException(GraphQLError)

Initializes a new instance of the [LayoutServiceGraphQlException](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.layoutservice.client.requesthandlers.graphql.layoutservicegraphqlexception.html) class.

##### Declaration

```csharp
public LayoutServiceGraphQlException(GraphQLError error)

```

##### Parameters

| Type | Name | Description |
| --- | --- | --- |
| GraphQL.GraphQLError | error | GraphQL Error of a GraphQL Query. |

### Properties

#### GraphQlError

Gets GraphQL Error of a GraphQL Query.

##### Declaration

```csharp
public GraphQLError GraphQlError { get; }

```

##### Property Value

| Type | Description |
| --- | --- |
| GraphQL.GraphQLError |  |
