Unverified Commit 1dfca629 authored by Jude Gao's avatar Jude Gao Committed by GitHub

Clean-up: remove unused errorMessage param in stack frames (#75554)

parent fd27e588
......@@ -31,8 +31,7 @@ export async function getErrorByType(
frames: await getOriginalStackFrames(
event.frames,
getErrorSource(event.reason),
isAppDir,
event.reason.toString()
isAppDir
),
}
if (event.type === ACTION_UNHANDLED_ERROR) {
......
......@@ -15,15 +15,14 @@ export interface OriginalStackFrame extends OriginalStackFrameResponse {
function getOriginalStackFrame(
source: StackFrame,
type: 'server' | 'edge-server' | null,
isAppDir: boolean,
errorMessage: string
isAppDir: boolean
): Promise<OriginalStackFrame> {
async function _getOriginalStackFrame(): Promise<OriginalStackFrame> {
const params = new URLSearchParams()
params.append('isServer', String(type === 'server'))
params.append('isEdgeServer', String(type === 'edge-server'))
params.append('isAppDirectory', String(isAppDir))
params.append('errorMessage', errorMessage)
for (const key in source) {
params.append(key, ((source as any)[key] ?? '').toString())
}
......@@ -86,13 +85,10 @@ function getOriginalStackFrame(
export function getOriginalStackFrames(
frames: StackFrame[],
type: 'server' | 'edge-server' | null,
isAppDir: boolean,
errorMessage: string
isAppDir: boolean
) {
return Promise.all(
frames.map((frame) =>
getOriginalStackFrame(frame, type, isAppDir, errorMessage)
)
frames.map((frame) => getOriginalStackFrame(frame, type, isAppDir))
)
}
......
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