fix: surface specific business-rule error messages to beekeepers
Backend business-rule guards (inactive apiary blocking colony create/move, active colonies blocking apiary deactivation, negative quantity on IN/OUT stock movements, unavailable queen blocking colony assignment, inactive colony blocking split/merge/move) threw English, UUID-laden exception text that the frontend either discarded in favor of a generic message or - in colony-actions.tsx's move/split/merge/ assign-queen dialogs - didn't handle at all, so the guard fired with zero visible feedback. Translated the messages to plain German and wired the affected mutations to display them, so a beekeeper sees the actual reason a save was rejected instead of silence or "failed". Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
1 parent
de5df72491
commit
997dadfaaa
8 files changed
+37
-11
No files matched your search
@@ -157,7 +157,7 @@ export class QueensService {
|
||||
const queen = await this.findById(id);
|
||||
if (QUEEN_NO_LONGER_AVAILABLE_STATUSES.includes(queen.status)) {
|
||||
throw new ConflictException(
|
||||
`Queen ${id} is not available for assignment (status: ${queen.status}) - correct her status first if this was a mistake`,
|
||||
'Die Königin ist nicht mehr verfügbar für eine Zuweisung - korrigiere zuerst ihren Status, falls dies ein Versehen war',
|
||||
);
|
||||
}
|
||||
const colony = await this.prisma.colony.findUnique({
|
||||
|
||||
Reference in new issue
Block a user