patches v1.0.2 #39
8 changed files with 38 additions and 8 deletions
|
@ -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
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue