Error

error/Error~ Error

The IMA application error extends the native Error with additional details that lead to the error and the HTTP status code to send to the client. Implementation note: This is an interface that extends the abstract class ExtensibleError, which does not make much sense from the strict OOP standpoint, but is necessary due to limitations of JavaScript, so that IMA errors are instances of both the native errors and of this interface.

Methods

getHttpStatus() → {number}

Source:
See:
Returns the HTTP status to send to the client. If the error has occurred at the client-side, the status code is used to determine the error page to show to the user. This method is a shorthand for the following code snippet: this.getParams().status || 500.
Returns:
The HTTP status to send to the client.
Type
number

getParams() → {Object.<string, *>}

Source:
See:
  • getHttpStatus
Returns the error parameters providing additional details about the error. The structure of the returned object is always situation-dependent, but the returned object usually contains the status: number field which represents the HTTP status to send to the client.
Returns:
The route parameters of the route at which the error has occurred.
Type
Object.<string, *>