Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-739

Authorization Failure Error Message, include namespace?

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 2.8, 3.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Django Nonrel, pymongo, Django-MongoDB-Engine
    • Minor Change

      A more verbose error message with an authorization failure would be nice. Particularly, name of the database as well as the info we are receiving (user, etc). Probably best if just in debug mode.

      I was recently working on a Django Project and was trying to set up my test environment with Django Nonrel, pymongo and Django-MongoDB-Engine.

      I was having authorization issues - Due totally to my inexperience with Django (Ruby/Rails background, worked with Flask but never Django).

      I had a dual sql/mongo database setup and it would try to create a new database with Mongo and could not. I was trying to figure out if it was my configuration, the fact that I had two databases and the db_router was not correct (trying to make sql tables on the mongodb) or an issue with my Mongo Username/Pass. After searching through all my code I realized it was b/c 'test_' was added before the database name (Django Feature).

      I know most everyone who uses Django would know this, but I did not. I am fine knowing I just need to learn more about Django.

      However, if I could have had more information, I would have been able to solve this much quicker.

            bernie@mongodb.com Bernie Hackett
            lostmarinero Kevin Berry
            0 Vote for this issue
            2 Start watching this issue