Skip to content

When i delopy a next.js 13.4 application with amplify, i call my /api/auth/login route got 500

0

When i delopy a next.js 13.4 application with amplify, i call my /api/auth/login route got 500

asked 2 years ago157 views
1 Answer
0

Encountering a 500 error when calling /api/auth/login in a Next.js 13.4 application deployed with Amplify indicates a backend issue, possibly related to Lambda function or API Gateway configuration.

To resolve this issue, first, inspect the AWS Lambda function logs (/api/auth/login) for any specific error messages. Verify the API Gateway configuration to ensure it correctly routes requests to the Lambda function. Additionally, check that endpoint URLs in both frontend (aws-exports.js) and backend configurations are accurate and aligned. Testing the endpoint locally with tools like Postman can help reproduce and debug the problem effectively.

EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.