# Lean - getErrors_v2

Use this method to get info about a specific error code or all errors code.

REST API
No REST API available for this method.

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

**Method:** getErrors_v2

| **Parameter** | **Description** | **Mandatory** |
|  --- | --- | --- |
| all_errors | Use true to get the full list of errors | YES |
| error_code | The error code.  It is used only if `all_errors = false`. | NO.  It is required if `all_errors = false`. |
| country_code | 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 a list of **Errors** objects:

* 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


#### 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_v2>
         <all_errors>true</all_errors>
         <country_code>en</country_code>        
      </ser:getErrors_v2>
   </soapenv:Body>
</soapenv:Envelope>
```

#### Response example


```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
     <soap:Body>
       <ns2:getErrors_v2Response xmlns:ns2="http://service.ws.nam/">
          <return>
            <errorCode>41</errorCode>
            <errorLanguage>DEU</errorLanguage>
            <errorLanguage2>DE</errorLanguage2>
            <errorText>Anmeldefehler</errorText>
          </return>
          <return>
            <errorCode>42</errorCode>
            <errorLanguage>DEU</errorLanguage>
            <errorLanguage2>DE</errorLanguage2>
            <errorText>Anmeldefehler: Laufzeitfehler</errorText>
          </return>


        </ns2:getErrors_v2Response>
   </soapenv:Body>
</soap:Envelope>
```

**Errors**: [Check here the main errors triggered.](/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-errors)