@dgac/nmb2b-client
Version:
EUROCONTROL Network Manager B2B SOAP client
23 lines (22 loc) • 830 B
JavaScript
//#region src/utils/NMB2BError.ts
/**
* Represents an error response received from NM B2B
*/
var NMB2BError = class extends Error {
constructor({ reply }) {
super();
if (reply.requestId) this.requestId = reply.requestId;
if (reply.requestReceptionTime) this.requestReceptionTime = reply.requestReceptionTime;
if (reply.sendTime) this.sendTime = reply.sendTime;
if (reply.inputValidationErrors) this.inputValidationErrors = reply.inputValidationErrors;
if (reply.warnings) this.warnings = reply.warnings;
if (reply.slaError) this.slaError = reply.slaError;
if (reply.reason) this.reason = reply.reason;
this.status = reply.status;
this.message = this.status;
if (this.reason) this.message = `${this.message}: ${this.reason}`;
}
};
//#endregion
export { NMB2BError };
//# sourceMappingURL=NMB2BError.mjs.map