File tree 2 files changed +10
-2
lines changed
packages/astro/src/vite-plugin-astro-server
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " astro " : patch
3
+ ---
4
+
5
+ Removes telemetry for unhandled errors in the dev server
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type { AstroConfig } from '../@types/astro.js';
3
3
import type DevPipeline from './devPipeline.js' ;
4
4
5
5
import { collectErrorMetadata } from '../core/errors/dev/index.js' ;
6
- import { createSafeError } from '../core/errors/index.js' ;
6
+ import { createSafeError , AstroErrorData } from '../core/errors/index.js' ;
7
7
import { formatErrorMessage } from '../core/messages.js' ;
8
8
import { eventError , telemetry } from '../events/index.js' ;
9
9
@@ -24,7 +24,10 @@ export function recordServerError(
24
24
// Our error should already be complete, but let's try to add a bit more through some guesswork
25
25
const errorWithMetadata = collectErrorMetadata ( err , config . root ) ;
26
26
27
- telemetry . record ( eventError ( { cmd : 'dev' , err : errorWithMetadata , isFatal : false } ) ) ;
27
+ // Ignore unhandled rejection errors as they appear A LOT and we cannot record the amount to telemetry
28
+ if ( errorWithMetadata . name !== AstroErrorData . UnhandledRejection . name ) {
29
+ telemetry . record ( eventError ( { cmd : 'dev' , err : errorWithMetadata , isFatal : false } ) ) ;
30
+ }
28
31
29
32
pipeline . logger . error (
30
33
null ,
You can’t perform that action at this time.
0 commit comments