Handle errors

This commit is contained in:
Fang-Pen Lin
2025-11-07 09:19:51 -08:00
parent 47ee70c6a0
commit e5db20d062
4 changed files with 71 additions and 29 deletions
@@ -74,7 +74,7 @@ export const certificateProfileDALFactory = (db: TDbClient) => {
.join(TableName.Project, `${TableName.PkiCertificateProfile}.projectId`, `${TableName.Project}.id`)
.select(selectAllTableCols(TableName.PkiCertificateProfile))
.select(db.ref("orgId").withSchema(TableName.Project).as("ownerOrgId"))
.where({ id })
.where(`${TableName.PkiCertificateProfile}.id`, id)
.first()) as (TCertificateProfile & { ownerOrgId: string }) | undefined;
return certificateProfile;
} catch (error) {