update database error messages
This commit is contained in:
parent
f89483f878
commit
f245ff74a8
72 changed files with 325 additions and 441 deletions
|
@ -2,6 +2,7 @@ import { dataSource } from "../../data-source";
|
|||
import { template } from "../../entity/settings/template";
|
||||
import { member } from "../../entity/club/member/member";
|
||||
import InternalException from "../../exceptions/internalException";
|
||||
import DatabaseActionException from "../../exceptions/databaseActionException";
|
||||
|
||||
export default abstract class TemplateService {
|
||||
/**
|
||||
|
@ -18,7 +19,7 @@ export default abstract class TemplateService {
|
|||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("templates not found", err);
|
||||
throw new DatabaseActionException("SELECT", "template", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -36,7 +37,7 @@ export default abstract class TemplateService {
|
|||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("template not found by id", err);
|
||||
throw new DatabaseActionException("SELECT", "template", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue