Skip to content

Commit 4fa2eb8

Browse files
Merge pull request #2552 from RedisInsight/be/bugfix/RI-4923_telemetry_event_sent_without_client_permissions
#RI-4923
2 parents 55e79f0 + 1d2cf35 commit 4fa2eb8

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

redisinsight/api/src/modules/database/providers/database-info.provider.spec.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
import { REDIS_MODULES_COMMANDS, AdditionalRedisModuleName } from 'src/constants';
2626
import { DatabaseInfoProvider } from 'src/modules/database/providers/database-info.provider';
2727
import { RedisDatabaseInfoResponse } from 'src/modules/database/dto/redis-info.dto';
28-
import { BadRequestException, ForbiddenException } from '@nestjs/common';
28+
import { BadRequestException, ForbiddenException, InternalServerErrorException } from '@nestjs/common';
2929
import { SentinelMasterStatus } from 'src/modules/redis-sentinel/models/sentinel-master';
3030
import ERROR_MESSAGES from 'src/constants/error-messages';
3131
import { FeatureService } from 'src/modules/feature/feature.service';
@@ -236,9 +236,11 @@ describe('DatabaseInfoProvider', () => {
236236
.calledWith('client', ['list'])
237237
.mockRejectedValue(new Error("unknown command 'client'"));
238238

239-
const result = await service.getClientListInfo(mockIORedisClient);
240-
241-
expect(result).toBe(undefined);
239+
try {
240+
await service.getClientListInfo(mockIORedisClient)
241+
} catch (err) {
242+
expect(err).toBeInstanceOf(InternalServerErrorException);
243+
}
242244
});
243245
});
244246

redisinsight/api/src/modules/database/providers/database-info.provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export class DatabaseInfoProvider {
311311
.filter(Boolean)
312312
.map((r) => convertBulkStringsToObject(r, ' ', '='));
313313
} catch (error) {
314-
return undefined;
314+
throw catchAclError(error);
315315
}
316316
}
317317

0 commit comments

Comments
 (0)