Constructor Summary
Public Constructor | ||
public |
constructor(inner: Error, errorType: string, status: number) |
since 0.1.0 |
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
Composes a body for the HTTP response to be sent. |
since 0.1.0 |
public |
Sets |
|
public |
Overrides class instance variables to reflect internal server error. |
since 0.1.0 |
Public Constructors
Public Members
Public Methods
public defineBody() since 0.1.0 source
Composes a body for the HTTP response to be sent. If the inner
error was a CompilerError
, it adds additional compiled
and location
fields to the body. In all cases, error_type
and message
are taken
from the current HttpError
instance.
public sendError(res: Object) source
Sets res.statusCode
with current instance status
and sends a
json response with the current instance body
.
Params:
Name | Type | Attribute | Description |
res | Object | Express response object. |
public serverError() since 0.1.0 source
Overrides class instance variables to reflect internal server error.