GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Exception: Request failed. Error was: Backend Error · Issue #470 · googleapis/google-cloud-python

Exception: Request failed. Error was: Backend Error #470

New issue
Copy link
New issue
Copy link
Closed
Closed
Exception: Request failed. Error was: Backend Error#470
Copy link
Assignees
dhermes
Labels
🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.

Description

@pdknsk
pdknsk
opened on Dec 28, 2014
Issue body actions

I'm getting this error for every request, get or put. I don't know why. The API console only knows this.

Methods Error codes
datastore.datasets.commit 500
datastore.datasets.lookup 500

Activity

Next
  1. dhermes commented on Dec 29, 2014

    @dhermes
    dhermes
    on Dec 29, 2014
    Contributor
    More actions

    Is there an error payload? Can you provide code snippets? What are you doing for auth? What version of the library are you using?

  2. pdknsk commented on Dec 30, 2014

    @pdknsk
    pdknsk
    on Dec 30, 2014
    Author
    More actions

    I've figured it out. The datastore is tied to an appengine app-id I use for testing, which was disabled in the old dashboard. Once I re-enabled it worked. I guess there is still a bug in the Error not being descriptive.

  3. pdknsk commented on Dec 30, 2014

    @pdknsk
    pdknsk
    on Dec 30, 2014
    Author
    More actions

    OT, but will this library also be installable through gcloud once it's stable? It's a bit confusing to me how gcloud-python and the other gcloud are related. Well done either way, it's an improvement from using the Remote API.

  4. dhermes
    closed this as completedon Dec 30, 2014
  5. dhermes commented on Dec 30, 2014

    @dhermes
    dhermes
    on Dec 30, 2014
    Contributor
    More actions

    @pdknsk

    RE: This bug, can you post a stacktrace and some code which caused it? I'll try it out on a disabled project to see if I can get come up with some feedback for the API team. (Our exceptions print the error messages returned in the payload.)

    RE: Install. I doubt it will be installable through gcloud but pip / PyPI is typically fine for installing Python libraries. Anything I'm missing?

    RE: gcloud. Our implicit auth already relies on oauth2client which shares tokens (locally) with the gcloud CLI tool.

    Thanks for the feedback about the confusion, it's good for us to hear these things.

    /cc @silvolu

  6. silvolu commented on Dec 30, 2014

    @silvolu
    silvolu
    on Dec 30, 2014
    Contributor
    More actions

    @pdknsk thanks for your feedback!

    RE: Install. Currently there are no plans to make this library installable through the gcloud CLI. As mentioned by @dhermes, making it pip-installable is our preferred approach.

  7. pdknsk commented on Jan 1, 2015

    @pdknsk
    pdknsk
    on Jan 1, 2015
    Author
    More actions

    What adds to the confusion is yet another gcloud, which is really gcloud-cli-go from what I can tell.

    To reproduce this bug, disable a project in Application Settings in the old Appengine Dashboard. This function does not seem to be available in the new Cloud Console. Run the steps to access a Datastore tied to an Appengine project, in particular the Wizard to enable the API.

    from gcloud import datastore
    a = datastore.get_dataset('app-id', '@developer.gserviceaccount.com', 'path/key')
    
    a.entity('item').save()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/user/.local/lib/python2.7/site-packages/gcloud/datastore/entity.py", line 244, in save
        exclude_from_indexes=self.exclude_from_indexes())
      File "/home/user/.local/lib/python2.7/site-packages/gcloud/datastore/connection.py", line 425, in save_entity
        result = self.commit(dataset_id, mutation)
      File "/home/user/.local/lib/python2.7/site-packages/gcloud/datastore/connection.py", line 329, in commit
        datastore_pb.CommitResponse)
      File "/home/user/.local/lib/python2.7/site-packages/gcloud/datastore/connection.py", line 81, in _rpc
        data=request_pb.SerializeToString())
      File "/home/user/.local/lib/python2.7/site-packages/gcloud/datastore/connection.py", line 59, in _request
        raise Exception('Request failed. Error was: %s' % content)
    Exception: Request failed. Error was: Backend Error
    
    # project re-enabled
    a.entity('item').save()
    <Entity[{'kind': u'item', 'id': 5649391675244544L}] {}>
  8. dhermes commented on Jan 2, 2015

    @dhermes
    dhermes
    on Jan 2, 2015
    Contributor
    More actions

    Thanks for giving me a way to replicate @pdknsk.

    I added a debug statement before the error is raised and actually printed the body and headers of the response.


    With writes disabled, but the app still enabled I got

    ('The API call datastore_v4.Commit() is temporarily unavailable: Datastore '
     'writes have been disabled by an application administrator. Writes can be '
     're-enabled in the admin console.')
    # Word-wrapping by me
    
    {
      "status": "403",
      "alternate-protocol": "443:quic,p=0.02",
      "content-length": "178",
      "x-xss-protection": "1; mode=block",
      "x-content-type-options": "nosniff",
      "transfer-encoding": "chunked",
      "expires": "Fri, 02 Jan 2015 18:28:40 GMT",
      "vary": "Origin, X-Origin",
      "server": "GSE",
      "-content-encoding": "gzip",
      "cache-control": "private, max-age=0",
      "date": "Fri, 02 Jan 2015 18:28:40 GMT",
      "x-frame-options": "SAMEORIGIN",
      "content-type": "text/html; charset=UTF-8"
    }
    

    With the app disabled (as @pdknsk suggests) I got

    'Backend Error'
    
    {
      "status": "503",
      "alternate-protocol": "443:quic,p=0.02",
      "content-length": "13",
      "x-xss-protection": "1; mode=block",
      "x-content-type-options": "nosniff",
      "transfer-encoding": "chunked",
      "expires": "Fri, 02 Jan 2015 18:31:42 GMT",
      "vary": "Origin, X-Origin",
      "server": "GSE",
      "-content-encoding": "gzip",
      "cache-control": "private, max-age=0",
      "date": "Fri, 02 Jan 2015 18:31:42 GMT",
      "x-frame-options": "SAMEORIGIN",
      "content-type": "text/html; charset=UTF-8"
    }
    

    Do you think we should also print the status code? Here the information was 403 Forbidden when writes aren't allowed vs. 503 Service Unavailable when the app is turned off.

    Do you think the backend should return more than just Backend Error if the app is turned off? FWIW I also tried this on apps that don't exist and apps that my credentials can't see and in both cases got a non-descript error and a 503. This may indicate that the error is a security protection.

  9. pdknsk commented on Jan 2, 2015

    @pdknsk
    pdknsk
    on Jan 2, 2015
    Author
    More actions

    I don't know how this works behind the scenes, but I've been thinking that Datastore should perhaps be able to operate separately from App Engine. Storage does. Every App Engine project gets a default bucket named app-id.appspot.com which can be accessed with this API even when the app is disabled. I just tried.

  10. dhermes commented on Jan 2, 2015

    @dhermes
    dhermes
    on Jan 2, 2015
    Contributor
    More actions

    @pdknsk Thanks for the feedback.

    @silvolu What's the right channel for this?

  11. jgeewax
    added
    api: datastoreIssues related to the Datastore API.
    on Jan 30, 2015
  12. jgeewax
    modified the milestone: This milestone has been deleted on Jan 30, 2015
  13. yoshi-automation
    added
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Apr 7, 2020
  14. 14 remaining items

  15. parthea
    added a commit that references this issue on Oct 22, 2023

    chore(python): drop flake8-import-order in samples noxfile (#470)

    0f1bdb6
  16. parthea
    added a commit that references this issue on Aug 21, 2025

    chore(main): release 2.14.1 (#470)

    11f34e8
  17. parthea
    added 2 commits that reference this issue on Sep 16, 2025

    chore(main): release 2.14.1 (#470)

    0213916

    chore(main): release 0.17.0 (#472)

    8a5066c
  18. parthea
    added 8 commits that reference this issue on Nov 24, 2025

    fix: pass metadata to pagers (#470)

    ca46a5b

    Cross patch #470 to ads templates (#510)

    ddcea4b

    docs: Update property requirement specifications (#470)

    80c8083

    build(python): fix `docs` and `docfx` builds (#470)

    b8571a0

    feat: add context manager support in client (#470)

    263637e

    chore(python): exclude templated GH action workflows (#470)

    71a63d2

    fix: ignore datastore properties that are not mapped to NDB properties (

    78ab52f

    chore(python): exclude templated GH action workflows (#470)

    2e1e9fd
  19. parthea
    added 2 commits that reference this issue on Mar 9, 2026

    chore(deps): update dependency more-itertools to v10 (#470)

    a64fed3

    chore: new owl bot post processor docker image (#470)

    8146d88
  20. parthea
    added a commit that references this issue on Sep 8, 2026

    docs: migrate code from googleapis/python-bigquery (#18303)

    23f9a74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dhermes
    dhermes

Labels

🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.