This could be an issue with a specific library that you may be using or something within the app’s response that App Engine isn’t liking. Of course it could be many other things. First, I would recommend you to implement logging within your app to see if you can attribute this error to a specific line of code. After doing this, you could try posting the stack trace of the error and the relevant lines of codes as well as the libraries being used in Stack overflow so maybe the community can provide you with some advice as it is hard to tell without having all the pieces of information.
You could also try contacting GCP support as they can inspect your application and provide you with more details of what could be going wrong.