> For the complete documentation index, see [llms.txt](https://error.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://error.angular-package.dev/commonerrors/overview.md).

# Overview

## `CommonErrors {}`

The `CommonErrors` object represents the storage of errors with [unique identification](/getting-started/basic-concepts.md#unique-identification) numbers.

{% embed url="<https://github.com/angular-package/error/blob/main/src/lib/common-errors.class.ts>" %}
`common-errors.class.ts`
{% endembed %}

### **Accessors**

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>protected get</strong> <a href="/pages/17m0fDb46LZWkooB1FqX"><strong>errors()</strong></a><strong>:</strong> <mark style="color:green;">Map</mark><<mark style="color:green;">Id</mark>, <mark style="color:green;">any</mark>><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor returns the errors of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map"><code>Map</code></a> type by returning the <a href="/pages/2ir7K33VMKRDy2vjKyP7"><code>#errors</code></a> property of a specified object.</p> |

### Properties

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="/pages/dOsyXdOuhEgblyUQ9QW5"><strong>template?</strong></a><strong>:</strong> <mark style="color:green;">string</mark></p><p>Optional template of <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html#string"><code>string</code></a> type.</p>                                                                                                                                                                                                                     |
| <p><a href="/pages/JAuIoagdUhqE3FJbZEcf"><strong>#id?</strong></a><strong>:</strong> <mark style="color:green;">Set</mark><<mark style="color:green;">Id</mark>><br>The collection of unique allowed <a href="/pages/6Nle1uMltWSb2uh6hgTQ#unique-identification">identification</a> numbers of generic type variable <a href="/pages/fKW6bm1HGWKrX5c1MDO3#commonerrors-less-than-id-greater-than"><code>Id</code></a>.</p>                                                                                                        |
| <p><a href="/pages/2ir7K33VMKRDy2vjKyP7"><strong>#errors</strong></a><strong>:</strong> <mark style="color:green;">Map</mark><<mark style="color:green;">Id</mark>, <mark style="color:green;">any</mark>><br>The errors storage of the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map"><code>Map</code></a> type where the <code>key</code> is of the generic type variable <a href="/pages/fKW6bm1HGWKrX5c1MDO3#commonerrors-less-than-id-greater-than"><code>Id</code></a>.</p> |

### Methods

|                                                                                                                                                                                                                                                                                                                                                                                                                             |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public</strong> <a href="/pages/xi0YKoG8xZkgZN9NkFaw"><strong>delete()</strong></a><strong>:</strong> <mark style="color:green;">this</mark></p><p>Deletes the error of a specified <a href="/pages/xi0YKoG8xZkgZN9NkFaw#id-errorid"><code>id</code></a> from the object.</p>                                                                                                                                    |
| <p><strong>public</strong> <a href="/pages/5dVyxHbYOjpt7OCBaNam"><strong>has()</strong></a><strong>:</strong> <mark style="color:green;">boolean</mark><br>The <code>has()</code> method checks whether the error of the given <a href="/pages/5dVyxHbYOjpt7OCBaNam#id-errorid"><code>id</code></a> exists in a specified object.</p>                                                                                       |
| <p><strong>public</strong> <a href="/pages/T7Dy5DRfviVlHi4BXeuA"><strong>throw()</strong></a><strong>:</strong> <mark style="color:green;">void</mark><br>Throws an error of the given <a href="/pages/T7Dy5DRfviVlHi4BXeuA#id-errorid"><code>id</code></a> if the unique <a href="/pages/mb13waFtHVZxVvkUgUwQ#...id-id"><code>id</code></a> was provided in the <a href="/pages/mb13waFtHVZxVvkUgUwQ">constructor</a>.</p> |
| <p><strong>protected</strong> <a href="/pages/PkOMsn22h7BbWBQydoO7"><strong>isAllowedId()</strong></a><strong>:</strong> <mark style="color:green;">boolean</mark><br>Checks whether the given <a href="/pages/6Nle1uMltWSb2uh6hgTQ#unique-identification">identification</a> number was provided in the <a href="/pages/mb13waFtHVZxVvkUgUwQ">constructor</a>.</p>                                                         |
