---
title: "Get Index Errors Operation"
url: "https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-index-errors"
version: "6.2"
language: "java"
---

# Get Index Errors Operation

> Client language: Java. Also available for [C#](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-index-errors.md), [Python](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-index-errors.python.md), [PHP](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-index-errors.php.md), [Node.js](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-index-errors.nodejs.md).
>
> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

**GetIndexErrorsOperation** is used to return errors encountered during document indexing.

## Syntax

```java
public GetIndexErrorsOperation()

public GetIndexErrorsOperation(String[] indexNames)
```

```java
public class IndexErrors {
  private String name;
  private IndexingError[] errors;

  public IndexErrors() {
      errors = new IndexingError[0];
  }

  public String getName() {
      return name;
  }

  public void setName(String name) {
      this.name = name;
  }

  public IndexingError[] getErrors() {
      return errors;
  }

  public void setErrors(IndexingError[] errors) {
      this.errors = errors;
  }
}
```

```java
public class IndexingError {

  private String error;
  private Date timestamp;
  private String document;
  private String action;

  public String getError() {
      return error;
  }

  public void setError(String error) {
      this.error = error;
  }

  public Date getTimestamp() {
      return timestamp;
  }

  public void setTimestamp(Date timestamp) {
      this.timestamp = timestamp;
  }

  public String getDocument() {
      return document;
  }

  public void setDocument(String document) {
      this.document = document;
  }

  public String getAction() {
      return action;
  }

  public void setAction(String action) {
      this.action = action;
  }
}
```

| Return Value | | |
| - | - | - |
| **Name** | String | Index name |
| **Errors** | IndexingError\[] | List of indexing errors |

## Example I

```java
// gets errors for all indexes
IndexErrors[] indexErrors
  = store.maintenance().send(new GetIndexErrorsOperation());
```

## Example II

```java
// gets errors only for 'Orders/Totals' index
IndexErrors[] indexErrors
  = store.maintenance()
      .send(new GetIndexErrorsOperation(new String[]{"Orders/Totals"}));
```

## See also

- [What are Indexes](https://docs.ravendb.net/6.2/indexes/what-are-indexes.java.md)
- [Creating and Deploying Indexes](https://docs.ravendb.net/6.2/indexes/creating-and-deploying.java.md)
- [Debugging Index Errors](https://docs.ravendb.net/6.2/indexes/troubleshooting/debugging-index-errors.md)
- [Index Administration](https://docs.ravendb.net/6.2/indexes/index-administration.md)
- [How to Reset Index](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/reset-index.java.md)
- [Delete index errors](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/delete-index-errors.md)
