Unverified Commit 7fc9acf2 authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[dev-overlay] Remove unused fields from unhandled error action event (#77333)

parent c663876c
...@@ -38,7 +38,6 @@ import type { ...@@ -38,7 +38,6 @@ import type {
TurbopackMsgToBrowser, TurbopackMsgToBrowser,
} from '../../../../server/dev/hot-reloader-types' } from '../../../../server/dev/hot-reloader-types'
import { REACT_REFRESH_FULL_RELOAD_FROM_ERROR } from '../shared' import { REACT_REFRESH_FULL_RELOAD_FROM_ERROR } from '../shared'
import type { HydrationErrorState } from '../../errors/hydration-error-info'
import type { DebugInfo } from '../types' import type { DebugInfo } from '../types'
import { useUntrackedPathname } from '../../navigation-untracked' import { useUntrackedPathname } from '../../navigation-untracked'
import { getReactStitchedError } from '../../errors/stitched-error' import { getReactStitchedError } from '../../errors/stitched-error'
...@@ -511,12 +510,8 @@ export default function HotReload({ ...@@ -511,12 +510,8 @@ export default function HotReload({
const handleOnUnhandledError = useCallback( const handleOnUnhandledError = useCallback(
(error: Error): void => { (error: Error): void => {
const errorDetails = (error as any).details as
| HydrationErrorState
| undefined
// Component stack is added to the error in use-error-handler in case there was a hydration error // Component stack is added to the error in use-error-handler in case there was a hydration error
const componentStackTrace = (error as any)._componentStack const componentStackTrace = (error as any)._componentStack
const warning = errorDetails?.warning
dispatch({ dispatch({
type: ACTION_UNHANDLED_ERROR, type: ACTION_UNHANDLED_ERROR,
...@@ -526,7 +521,6 @@ export default function HotReload({ ...@@ -526,7 +521,6 @@ export default function HotReload({
typeof componentStackTrace === 'string' typeof componentStackTrace === 'string'
? parseComponentStack(componentStackTrace) ? parseComponentStack(componentStackTrace)
: undefined, : undefined,
warning,
}) })
}, },
[dispatch] [dispatch]
......
...@@ -66,7 +66,6 @@ export interface UnhandledErrorAction { ...@@ -66,7 +66,6 @@ export interface UnhandledErrorAction {
reason: Error reason: Error
frames: StackFrame[] frames: StackFrame[]
componentStackFrames?: ComponentStackFrame[] componentStackFrames?: ComponentStackFrame[]
warning?: [string, string, string]
} }
export interface UnhandledRejectionAction { export interface UnhandledRejectionAction {
type: typeof ACTION_UNHANDLED_REJECTION type: typeof ACTION_UNHANDLED_REJECTION
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment