Google cloud endpoint error in production, no stack trace

339 views
Skip to first unread message

Aakash Bapna

unread,
Mar 6, 2015, 6:15:29 AM3/6/15
to google-a...@googlegroups.com
The log viewer in production does not show stack trace? Is there a setting somewhere to enable?

My google cloud endpoint works fine on local, but gives error on production. I am not getting any headway in debugging this.

Below is the error on production.

Request URL: https://mapp.appspot.com/_ah/api/myapi/v1/mymethod Method: myapi.mymethod Error Code: 400 Reason: parseError Message: Parse Error





Chad Vincent

unread,
Mar 6, 2015, 3:41:26 PM3/6/15
to google-a...@googlegroups.com
Are you logging the exception?  What language?

I don't know what you're using, but the uncaught exception handler in Java does log the stack trace.

Aakash Bapna

unread,
Mar 6, 2015, 9:48:49 PM3/6/15
to google-a...@googlegroups.com
It's Python, I think the exception is thrown in google cloud endpoint lib. 

-
Aakash
--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/tUls2TByhlM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/a674c001-0e75-434b-a5c1-ab748b8deab3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vinny P

unread,
Mar 11, 2015, 6:06:05 PM3/11/15
to google-a...@googlegroups.com
On Fri, Mar 6, 2015 at 8:48 PM, Aakash Bapna <aakash...@gmail.com> wrote:
It's Python, I think the exception is thrown in google cloud endpoint lib. 

On 07-Mar-2015, at 2:11 am, Chad Vincent <ccrvi...@gmail.com> wrote:

Are you logging the exception?  What language?
I don't know what you're using, but the uncaught exception handler in Java does log the stack trace.


I'm in the same boat as Chad - I'm more used to Java Endpoints than Python Endpoints and I'm not sure how Python Endpoints handle logging. Can you try configuring ereporter? https://cloud.google.com/appengine/articles/python/recording_exceptions_with_ereporter

Typically parse errors are thrown when the incoming JSON is invalid or not-well-formed for some reason. Try having your client app submit a typical request to a dummy server, or a test service such as http://requestb.in/ . Then once you've captured the request, you can inspect the JSON: ensure that it passes validation, that the content type header is correct, the expected properties are set, etc.

 
 
-----------------
-Vinny P
Technology & Media Consultant
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

Aakash Bapna

unread,
Mar 17, 2015, 5:24:10 AM3/17/15
to google-a...@googlegroups.com
Thanks all, the issue was because of missing Content-Type:application/json request header. The local dev server misses this check and works.

Regards,
Aakash

--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/tUls2TByhlM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.

Bogdan Melnychuk

unread,
Oct 7, 2016, 9:09:41 AM10/7/16
to Google App Engine
Thank you so much for this
Reply all
Reply to author
Forward
0 new messages