update database error messages
This commit is contained in:
parent
f89483f878
commit
f245ff74a8
72 changed files with 325 additions and 441 deletions
|
@ -1,6 +1,7 @@
|
|||
import { dataSource } from "../data-source";
|
||||
import { refresh } from "../entity/refresh";
|
||||
import { PWA_REFRESH_EXPIRATION, REFRESH_EXPIRATION } from "../env.defaults";
|
||||
import DatabaseActionException from "../exceptions/databaseActionException";
|
||||
import InternalException from "../exceptions/internalException";
|
||||
import { StringHelper } from "../helpers/stringHelper";
|
||||
import UserService from "../service/user/userService";
|
||||
|
@ -32,7 +33,7 @@ export default abstract class RefreshCommandHandler {
|
|||
return refreshToken;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("Failed saving refresh token", err);
|
||||
throw new DatabaseActionException("CREATE", "refresh", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -51,7 +52,7 @@ export default abstract class RefreshCommandHandler {
|
|||
.execute()
|
||||
.then((res) => {})
|
||||
.catch((err) => {
|
||||
throw new InternalException("failed refresh removal", err);
|
||||
throw new DatabaseActionException("DELETE", "refresh", err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -68,7 +69,7 @@ export default abstract class RefreshCommandHandler {
|
|||
.execute()
|
||||
.then((res) => {})
|
||||
.catch((err) => {
|
||||
throw new InternalException("failed expired refresh removal", err);
|
||||
throw new DatabaseActionException("DELETE", "refresh", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue