Hi @Jax.Yang, since the issue persisted in production.
1.) Do you in anyway implement sessions in your applications. because sometime, it can work in Local environment and not in productions if not properly configured.
2.)Again are you sure you are not having whitespaces in your code.
3.) Are You sure the problem is not from the Production Server.
Here is what I can suggest and My questions.
1.) You will first keep Ajax Call out of this context. For accurate error tracking, You will need to enable error tracking in your backend application code.
You will need to run the Code natively and Print the error Statement being reported by your backend programming Language the way it is. So that we can know the exact Error message in production. Forget what the ajax call is saying for now. give us the core error message from backend
2.) What exactly is your Backend Language.
3.) Just a note, In stackoverflow.com, you donβt just screenshot an error message, You have to share a simplified code causing the issue. in that way it will be easier for any developers to look into your code and find out the exact solution to the problem and you will get response faster.
Thank You