update
This commit is contained in:
@@ -34,6 +34,16 @@ export class EmailServiceError extends OperationError {
|
||||
) {
|
||||
super(message, EMAIL_SERVICE_ERROR, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with updated context
|
||||
*/
|
||||
protected createWithContext(context: IErrorContext): PlatformError {
|
||||
return new (this.constructor as typeof EmailServiceError)(
|
||||
this.message,
|
||||
context
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,6 +62,16 @@ export class EmailTemplateError extends OperationError {
|
||||
) {
|
||||
super(message, EMAIL_TEMPLATE_ERROR, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with updated context
|
||||
*/
|
||||
protected createWithContext(context: IErrorContext): PlatformError {
|
||||
return new (this.constructor as typeof EmailTemplateError)(
|
||||
this.message,
|
||||
context
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,6 +90,16 @@ export class EmailValidationError extends ValidationError {
|
||||
) {
|
||||
super(message, EMAIL_VALIDATION_ERROR, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with updated context
|
||||
*/
|
||||
protected createWithContext(context: IErrorContext): PlatformError {
|
||||
return new (this.constructor as typeof EmailValidationError)(
|
||||
this.message,
|
||||
context
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -88,6 +118,16 @@ export class EmailSendError extends OperationError {
|
||||
) {
|
||||
super(message, EMAIL_SEND_ERROR, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with updated context
|
||||
*/
|
||||
protected createWithContext(context: IErrorContext): PlatformError {
|
||||
return new (this.constructor as typeof EmailSendError)(
|
||||
this.message,
|
||||
context
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance for a permanently failed send
|
||||
@@ -161,6 +201,16 @@ export class EmailReceiveError extends OperationError {
|
||||
) {
|
||||
super(message, EMAIL_RECEIVE_ERROR, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with updated context
|
||||
*/
|
||||
protected createWithContext(context: IErrorContext): PlatformError {
|
||||
return new (this.constructor as typeof EmailReceiveError)(
|
||||
this.message,
|
||||
context
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -256,6 +306,16 @@ export class EmailParseError extends OperationError {
|
||||
) {
|
||||
super(message, EMAIL_PARSE_ERROR, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with updated context
|
||||
*/
|
||||
protected createWithContext(context: IErrorContext): PlatformError {
|
||||
return new (this.constructor as typeof EmailParseError)(
|
||||
this.message,
|
||||
context
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -274,6 +334,16 @@ export class EmailRateLimitError extends ResourceError {
|
||||
) {
|
||||
super(message, EMAIL_RATE_LIMIT_EXCEEDED, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with updated context
|
||||
*/
|
||||
protected createWithContext(context: IErrorContext): PlatformError {
|
||||
return new (this.constructor as typeof EmailRateLimitError)(
|
||||
this.message,
|
||||
context
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance with rate limit information
|
||||
|
Reference in New Issue
Block a user