Compare commits

...

2 Commits

Author SHA1 Message Date
f289afd8bc Updated mail errors
ref #151
2021-03-04 16:10:26 +01:00
a9e06c9055 Promoted axios to dependency
ref #151
2021-03-04 15:56:24 +01:00
2 changed files with 10 additions and 5 deletions

View File

@ -24,6 +24,7 @@
"dependencies": {
"@odit/class-validator-jsonschema": "2.1.1",
"argon2": "^0.27.1",
"axios": "^0.21.1",
"body-parser": "^1.19.0",
"class-transformer": "0.3.1",
"class-validator": "^0.13.1",
@ -57,7 +58,6 @@
"@types/jsonwebtoken": "^8.5.0",
"@types/node": "^14.14.22",
"@types/uuid": "^8.3.0",
"axios": "^0.21.1",
"cp-cli": "^2.0.0",
"jest": "^26.6.3",
"nodemon": "^2.0.7",

View File

@ -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!");
}
}