# Lean - getErrors

Use this method to get info about an error code.

**For the full technical reference, see the [OpenAPI specification](/products/leandisposable/openapi/utility/geterrors)**.

REST API
#### Endpoint


```
GET /api/utility/errors
```

#### Headers

| Name | Required | Description |
|  --- | --- | --- |
| `Content-Type` | Yes | Must be `application/json`. |


#### Query parameters

| Parameter | Type | Required | Description |
|  --- | --- | --- | --- |
| `code` | integer | Yes | The error code to look up. |
| `language` | string | Yes | Language for the error text. ISO 639-1 alpha-2: `EN`, `IT`, `DE`, `ES`, `RO`. ISO 639-2 alpha-3 codes (`ENG`, `ITA`, `DEU`, `SPA`, `RON`) are accepted for legacy compatibility but will not be extended to new languages. |


#### Request example


```
GET /api/utility/errors?code=1027&language=EN
```

#### Response examples

**200 — Error found**


```json
{
  "errorCode": 1027,
  "errorLanguage": "ENG",
  "errorLanguage2": "EN",
  "errorText": "The file is duplicated"
}
```

If the error code does not exist, the response is HTTP 200 with `errorText: "Unspecified error"`.

SOAP API
The SOAP interface is deprecated. Use the REST API instead.

**Method:** getErrors

| **Parameter** | **Description** | **Mandatory** |
|  --- | --- | --- |
| errorCode | The error code | YES |
| errorLanguage | Specify the language for the text of the error.  You can use these allowed values: -**EN** or **ENG**: english -**IT** or **ITA**: italian -**DE** or **DEU**: german -**ES** or **SPA**: spanish -**RO** or **RON**: romanian | YES |


This method returns an **Errors** object:

* errorCode – the language of the document
* errorLanguage - iso country code alpha3 (three-letter code)
* errorLanguage2 - iso country code alpha2 (two-letter code)
* errorText - text of the error


You can get the same info using the method `getErrors_v2(all_errors= false, error_code= errorCode, country_code = errorLanguage)`.

#### Request example


```xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.ws.nam/">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:getErrors>
         <errorCode>00081</errorCode>
         <errorLanguage>DE</errorLanguage>
      </ser:getErrors>
   </soapenv:Body>
</soapenv:Envelope>
```

#### Response example


```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns2:getErrorsResponse xmlns:ns2="http://service.ws.nam/">
            <return>
                <errorCode>81</errorCode>
                <errorLanguage>DEU</errorLanguage>
                <errorLanguage2>DE</errorLanguage2>
                <errorText>Falsche Steuernummer oder persönliche Identifikationsnummer</errorText>
            </return>
        </ns2:getErrorsResponse>
    </soap:Body>
</soap:Envelope>
```

#### Error codes

For authentication errors, see [Authentication](/products/leandisposable/enterprise-documentation/developer-documentation/authentication).

For the full list of errors, see [Methods to manage errors](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-errors).