We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export abstract class CouchDbService { private readonly connection = nano(Utils.CouchDbUrlAuth); private readonly db: DocumentScope<string>; constructor(dbName: DB) { this.db = this.connection.use(dbName); } ... let mangoQuery = { selector: { _id: {$exists: true} }, fields: ["_id"], limit: 50 }; this.db.find(mangoQuery);
Successful response
{ "message": "Referer header required.", "stack": "Error: Referer header required. at Request._callback (*\node_modules\nano\lib\nano.js:154:15) at Request.self.callback (*\node_modules\request\request.js:185:22) at Request.emit (events.js:189:13) at Request.EventEmitter.emit (domain.js:441:20) at Request.<anonymous> (*\node_modules\request\request.js:1161:10) at Request.emit (events.js:189:13) at Request.EventEmitter.emit (domain.js:441:20) at IncomingMessage.<anonymous> (*\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:277:13)", "name": "Error", "error": "bad_request", "reason": "Referer header required.", "scope": "couch", "statusCode": 400, "request": { "method": "POST", "headers": { "content-type": "application/json", "accept": "application/json" }, "uri": "https://XXXXXX:XXXXXX@***/***/_find", "body": "{"selector":{"_id":{"$exists":true}},"fields":["_id"],"limit":50}", "qsStringifyOptions": { "arrayFormat": "repeat" } }, "headers": { "uri": "https://XXXXXX:XXXXXX@***/***/_find", "statusCode": 400, "date": "Mon, 29 Apr 2019 17:06:54 GMT", "content-type": "application/json", "cache-control": "must-revalidate" }, "errid": "non_200", "description": "couch returned 400" }
hz
Trying to make search in CouchDB with MongoBD syntax;
The text was updated successfully, but these errors were encountered:
I'm getting the same via the homebrew installation with the following code:
export async function getUserByEmail(email: string): Promise<IUser> { const users = nano.use('users') const resp = await users.find({ fields: ["emails"], selector: { emails: { $elemMatch: { $eq: email, }, }, }, }); // ... }
Sorry, something went wrong.
any solution? i'm getting the same error. async function find() { try { const dbMobile = mobileNano.db.use("myDb"); const data = await dbMobile.find({ params: { selector: { "|type": "user", }, }, }); console.log("dd", data); } catch (error) { console.log("Error: ", error); } }
No branches or pull requests
Code:
Expected Behavior
Successful response
Current Behavior
Possible Solution
hz
Context
Trying to make search in CouchDB with MongoBD syntax;
Your Environment
The text was updated successfully, but these errors were encountered: