# get message()

## `CommonError.prototype.message`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor gets the error [message](https://error.angular-package.dev/draft-5/getting-started/basic-concepts#message) by returning the parent [`message`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/message) property of the [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object.

{% code title="common-error.class.ts" %}

```typescript
public get message(): string {
  return super.message;
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`string`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#string)

### Returns

The **return value** is the error [message](https://error.angular-package.dev/draft-5/getting-started/basic-concepts#message) of a [`string`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) type.

## Example usage

```typescript
// Example usage.
import { CommonError } from '@angular-package/error';

// Extend the `CommonError` class.
class TestError<Id extends string> extends CommonError<Id> {}

// Returns "Problem(AE:427): Problem accessor. => Fix: Fix accessor.".
new TestError('Problem accessor.', 'Fix accessor.', '(AE:427)').message;
```
