Search code examples
google-app-enginecurlgoogle-cloud-endpointsgoogle-apis-explorer

Request to Google Endpoints Quickstart API Fails with a 503


I am working through the Quickstart for Cloud Endpoints Frameworks on Google App Engine. After deploying the app I try to send a request to the API as outlined in the Quickstart:

curl -H "Content-Type: application/json" -X POST -d '{"content":"Hello world!"}' https://[my-app].appspot.com/_ah/api/echo/v1/echo

It returns the following error message:

{
 "error": {
  "code": 503,
  "errors": [
   {
    "domain": "global",
    "message": "Internal Server Error",
    "reason": "backendError"
   }
  ],
  "message": "Internal Server Error"
 }
}

There are 4 APIs created in the endpoints-frameworks-v2/echo sample. I get the same error message when I go to the API explorer and try to test the first 3 APIs. The last API get_user_email works as expected after after I authorise and execute it.

Any help would be great.


Solution

  • It turned out to be a valadation error with what I was entering:

    ValidationError: Expected type <type 'unicode'> for field content, found (None, None) (type <type 'tuple'>)
    

    After I put in the expected type there was no issues.