patches v1.0.2 #39

Merged
jkeffects merged 9 commits from develop into main 2025-01-13 10:22:29 +00:00
8 changed files with 38 additions and 8 deletions
Showing only changes of commit d206d7a77c - Show all commits

View file

@ -60,7 +60,10 @@ export default abstract class AwardCommandHandler {
.execute()
.then(() => {})
.catch((err) => {
throw new InternalException("Failed deleting award", err);
throw new InternalException(
`Failed deleting award ${err.code.includes("ER_ROW_IS_REFERENCED") ? " due to referenced data" : ""}`,
err
);
});
}
}

View file

@ -66,7 +66,10 @@ export default abstract class CalendarTypeCommandHandler {
.execute()
.then(() => {})
.catch((err) => {
throw new InternalException("Failed deleting calendarType", err);
throw new InternalException(
`Failed deleting calendarType${err.code.includes("ER_ROW_IS_REFERENCED") ? " due to referenced data" : ""}`,
err
);
});
}
}

View file

@ -66,7 +66,12 @@ export default abstract class CommunicationTypeCommandHandler {
.execute()
.then(() => {})
.catch((err) => {
throw new InternalException("Failed deleting communicationType", err);
throw new InternalException(
`Failed deleting communicationType${
err.code.includes("ER_ROW_IS_REFERENCED") ? " due to referenced data" : ""
}`,
err
);
});
}
}

View file

@ -64,7 +64,12 @@ export default abstract class ExecutivePositionCommandHandler {
.execute()
.then(() => {})
.catch((err) => {
throw new InternalException("Failed deleting executivePosition", err);
throw new InternalException(
`Failed deleting executivePosition${
err.code.includes("ER_ROW_IS_REFERENCED") ? " due to referenced data" : ""
}`,
err
);
});
}
}

View file

@ -64,7 +64,12 @@ export default abstract class MembershipStatusCommandHandler {
.execute()
.then(() => {})
.catch((err) => {
throw new InternalException("Failed deleting membershipStatus", err);
throw new InternalException(
`Failed deleting membershipStatus${
err.code.includes("ER_ROW_IS_REFERENCED") ? " due to referenced data" : ""
}`,
err
);
});
}
}

View file

@ -66,7 +66,10 @@ export default abstract class QualificationCommandHandler {
.execute()
.then(() => {})
.catch((err) => {
throw new InternalException("Failed deleting qualification", err);
throw new InternalException(
`Failed deleting qualification${err.code.includes("ER_ROW_IS_REFERENCED") ? " due to referenced data" : ""}`,
err
);
});
}
}

View file

@ -63,7 +63,10 @@ export default abstract class QueryStoreCommandHandler {
.execute()
.then(() => {})
.catch((err) => {
throw new InternalException("Failed deleting queryStore", err);
throw new InternalException(
`Failed deleting queryStore${err.code.includes("ER_ROW_IS_REFERENCED") ? " due to referenced data" : ""}`,
err
);
});
}
}

View file

@ -64,7 +64,10 @@ export default abstract class TemplateCommandHandler {
.execute()
.then(() => {})
.catch((err) => {
throw new InternalException("Failed deleting template", err);
throw new InternalException(
`Failed deleting template${err.code.includes("ER_ROW_IS_REFERENCED") ? " due to referenced data" : ""}`,
err
);
});
}
}