service-model
Version:
An object oriented web service framework inspired by Windows Communication Foundation.
26 lines (25 loc) • 1.01 kB
JavaScript
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var httpError_1 = require("./httpError");
/**
* An error that is returned to the client. When an operation passes a FaultError to it's callback, the specifics of the
* error are passed to the client including the code, details, and message. Additionally, the HttpStatusCode is used
* to set the status on the HTTP response.
*/
var FaultError = (function (_super) {
__extends(FaultError, _super);
function FaultError(detail, message, code, statusCode) {
_super.call(this, statusCode, message);
/**
* The name of the error.
*/
this.name = "FaultError";
this.code = code;
this.detail = detail;
}
return FaultError;
})(httpError_1.HttpError);
exports.FaultError = FaultError;