We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc79f4a commit 7a5f29dCopy full SHA for 7a5f29d
packages/browser/src/utils/featureFlags.ts
@@ -1,4 +1,6 @@
1
import type { FeatureFlag } from '@sentry/types';
2
+import { logger } from '@sentry/utils';
3
+import { DEBUG_BUILD } from '../debug-build';
4
5
/**
6
* Ordered LRU cache for storing feature flags in the scope context. The name
@@ -32,7 +34,8 @@ export function insertToFlagBuffer(
32
34
maxSize: number = FLAG_BUFFER_SIZE,
33
35
): void {
36
if (flags.length > maxSize) {
- throw Error(`insertToFlagBuffer called on a buffer larger than the given maxSize=${maxSize}`);
37
+ DEBUG_BUILD && logger.error(`insertToFlagBuffer called on a buffer larger than the given maxSize=${maxSize}`);
38
+ return;
39
}
40
41
// Check if the flag is already in the buffer - O(n)
0 commit comments