Skip to content

Commit d31895e

Browse files
update debug logs
1 parent 4174f98 commit d31895e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/js/tools/metroconfig.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export function withSentryBabelTransformer(config: MetroConfig): MetroConfig {
104104
logger.debug('Default Babel transformer path from `config.transformer`:', defaultBabelTransformerPath);
105105

106106
if (!defaultBabelTransformerPath) {
107+
// This has to be console.warn because the options is enabled but won't be used
107108
// eslint-disable-next-line no-console
108109
console.warn('`transformer.babelTransformerPath` is undefined.');
109110
// eslint-disable-next-line no-console

src/js/tools/sentryBabelTransformerUtils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export function cleanDefaultBabelTransformerPath(): void {
4444
}
4545
logger.debug('Cleaned default Babel transformer path');
4646
} catch (e) {
47+
// We don't want to fail the build if we can't clean the file
4748
// eslint-disable-next-line no-console
4849
console.error('[Sentry] Failed to clean default Babel transformer path:', e);
4950
}
@@ -59,7 +60,7 @@ function getDefaultBabelTransformerPath(): string {
5960
export function loadDefaultBabelTransformer(): BabelTransformer {
6061
const defaultBabelTransformerPath = readDefaultBabelTransformerPath();
6162
if (!defaultBabelTransformerPath) {
62-
throw new Error('Default Babel transformer path not found');
63+
throw new Error('Default Babel Transformer Path not found in `.sentry` directory.');
6364
}
6465

6566
logger.debug(`Loading default Babel transformer from ${defaultBabelTransformerPath}`);

0 commit comments

Comments
 (0)