Skip to content

Potential improvements to redirect-frame/app/api/frame/route.ts #5

Description

@valentineejimole

There needs to be improvement on this code for proper error handling

Add Error Handling: Include error handling in case the redirect fails or if there are issues with the request.

async function getResponse(req: NextRequest): Promise<NextResponse> {
try {
return NextResponse.redirect('https://redirect-frame.vercel.app/redirect', { status: 302 });
} catch (error) {
console.error('Error during redirect:', error);
return NextResponse.error();
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions