You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by carlosduclos <gi...@git.apache.org> on 2017/03/17 12:46:17 UTC

[GitHub] couchdb-nano issue #8: db.follow ignores requestDefaults

GitHub user carlosduclos opened an issue:

    https://github.com/apache/couchdb-nano/issues/8

    db.follow ignores requestDefaults

    [Original issue](https://github.com/dscape/nano/issues/278)
    
    __gr2m__
    Given
    
    a database exists at http://localhost:5984/db-with-security, which is only accessible when signed in
    an admin exists with username admin and password secret
    And I run this code
    ```javascript
    var nano = require('nano')
    
    var db = nano({
      url: 'http://localhost:5984/db-with-security',
      requestDefaults: {
        auth: {
          user: 'admin',
          pass: 'secret'
        }
      }
    })
    
    db.info(function (error, info) {
      if (error) {
        return console.log(error)
      }
      console.log('info ok.')
    
      db.follow(function (error) {
        if (error) {
          return console.log(error)
        }
    
        console.log('follow ok.')
      })
    })
    ```
    I get this error
    ```javascript
    info ok.
    [Error: Bad DB response: {"error":"unauthorized","reason":"You are not authorized to access this db."}]
    ```
    I've managed to add the user & pass to the CouchDB directly, so don't rely on requestDefaults anymore. But I'd still consider this an issue, from a user expectation perspective.

----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-nano issue #8: db.follow ignores requestDefaults

Posted by carlosduclos <gi...@git.apache.org>.
Github user carlosduclos commented on the issue:

    https://github.com/apache/couchdb-nano/issues/8
  
    This issue was referenced in other repositories too. I asked the author to look at this and continue the discussion here if relevant.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---