Skip to content

changesReader: Only GET allowed #367

@BananaAcid

Description

@BananaAcid

Trying to convert nano.feedUpdated to nano.db.use().changesReader ...

let feed = nano.db.use('_db_updates').changesReader.get({ since: lastStopped, include_docs: true });
// same with .start

feed.on('error', (err) => {
  console.error('changes feed error:\n', err);
})

changes feed error:

Error: Only GET allowed
    at responseHandler (.../node_modules/nano/lib/nano.js:203:20)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
{
  scope: 'couch',
  statusCode: 405,
  request: {
    url: 'http://localhost:5984/_db_updates/_changes?feed=longpoll&timeout=60000&since=....&limit=100&include_docs=false',
    method: 'post',
    headers: {
      accept: 'application/json',
      'user-agent': 'nano/11.0.4 (Node.js v25.8.2)',
      'Accept-Encoding': 'deflate, gzip',
      Authorization: 'XXXXXXX',
      'content-type': 'application/json'
    },
    credentials: 'include',
    body: '{}',
    redirect: 'error',
    signal: AbortSignal { aborted: false },
    bodyTimeout: 0
  },
  headers: {
    uri: 'http://localhost:5984/_db_updates/_changes?feed=longpoll&timeout=60000&since=....&limit=100&include_docs=false',
    statusCode: 405
  },
  errid: 'non_200',
  description: 'Only GET allowed',
  error: 'method_not_allowed',
  reason: 'Only GET allowed'
}
  • nano/11.0.4
  • Node.js/25.8.2
  • CouchDb/2.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions