# Class: MessagingError

## Constructor

#### new MessagingError(code, data)

  Class containing messaging error.

  Class extends AvayaClientServices.Base.BaseError.

  Class uses AvayaClientServices.Services.Messaging.MessagingErrorReason.

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `code` | string |  |
  `data` | object | <optional> |

## Members

#### message :string

  Message related with error.

  ##### Type:

  - string

  ##### See:

    - AvayaClientServices.Services.Messaging.MessagingErrorReason

#### name :string

  Name of an error. In this case it will be 'MessagingError'.

  ##### Type:

  - string

## Methods

#### getData() → {object}

  Returns optional data object.

  Inherited From:
    - AvayaClientServices.Base.BaseError#getData

  ##### Returns:

  { object }

#### getMessage() → {string}

  Returns message related with error.
  AvayaClientServices.Base.ErrorDictionary

  Inherited From:
    - AvayaClientServices.Base.BaseError#getMessage

  ##### Returns:

  { string }

#### getName() → {string}

  Returns name of an error.

  Inherited From:
    - AvayaClientServices.Base.BaseError#getName

  ##### Returns:

  { string }