diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-05-22 11:10:45 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-06-06 22:20:17 -0400 |
| commit | 4540614f7bfbfabf8767cecf313a65c0b689ac00 (patch) | |
| tree | 9165a33b62c9cfbc6c7de27695b5a897f09eb3e9 /packages/backend/src/core/ReactionService.ts | |
| parent | don't print massive HTTP errors in drive service (diff) | |
| download | sharkey-4540614f7bfbfabf8767cecf313a65c0b689ac00.tar.gz sharkey-4540614f7bfbfabf8767cecf313a65c0b689ac00.tar.bz2 sharkey-4540614f7bfbfabf8767cecf313a65c0b689ac00.zip | |
add more details to IdentifiableErrors
Diffstat (limited to 'packages/backend/src/core/ReactionService.ts')
| -rw-r--r-- | packages/backend/src/core/ReactionService.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/backend/src/core/ReactionService.ts b/packages/backend/src/core/ReactionService.ts index 86bf20067e..c23bb51178 100644 --- a/packages/backend/src/core/ReactionService.ts +++ b/packages/backend/src/core/ReactionService.ts @@ -117,7 +117,7 @@ export class ReactionService { if (note.userId !== user.id) { const blocked = await this.userBlockingService.checkBlocked(note.userId, user.id); if (blocked) { - throw new IdentifiableError('e70412a4-7197-4726-8e74-f3e0deb92aa7'); + throw new IdentifiableError('e70412a4-7197-4726-8e74-f3e0deb92aa7', 'Note not accessible for you.'); } } @@ -322,14 +322,14 @@ export class ReactionService { }); if (exist == null) { - throw new IdentifiableError('60527ec9-b4cb-4a88-a6bd-32d3ad26817d', 'not reacted'); + throw new IdentifiableError('60527ec9-b4cb-4a88-a6bd-32d3ad26817d', 'reaction does not exist'); } // Delete reaction const result = await this.noteReactionsRepository.delete(exist.id); if (result.affected !== 1) { - throw new IdentifiableError('60527ec9-b4cb-4a88-a6bd-32d3ad26817d', 'not reacted'); + throw new IdentifiableError('60527ec9-b4cb-4a88-a6bd-32d3ad26817d', 'reaction does not exist'); } // Decrement reactions count |