Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down Expand Up @@ -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))
)
}

Expand Down
Loading