From f289afd8bc47f6eae9f12f765322b2db974ba918 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Thu, 4 Mar 2021 16:10:26 +0100 Subject: [PATCH] Updated mail errors ref #151 --- src/errors/MailErrors.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/errors/MailErrors.ts b/src/errors/MailErrors.ts index 7772ca9..1bde0ba 100644 --- a/src/errors/MailErrors.ts +++ b/src/errors/MailErrors.ts @@ -1,12 +1,17 @@ -import { IsString } from 'class-validator' +import { IsString } from 'class-validator'; +import { InternalServerError } from 'routing-controllers'; /** * Error to throw when a permission couldn't be found. */ -export class MailServerConfigError extends Error { +export class MailSendingError extends InternalServerError { @IsString() - name = "MailServerConfigError" + name = "MailSendingError" @IsString() - message = "The SMTP server you provided couldn't be reached!" + message = "We had a problem sending the mail!" + + constructor() { + super("We had a problem sending the mail!"); + } } \ No newline at end of file