We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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(); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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();
}
}
The text was updated successfully, but these errors were encountered: