From aa6e609b6a2d53ef3eab1c99f4a25098bd577037 Mon Sep 17 00:00:00 2001 From: Glynn Bird Date: Fri, 28 Feb 2020 11:53:52 +0000 Subject: [PATCH] Nano8.2.0 (#318) * swap out db.head for db.request to avoid Nano 8.2.x incompatibility Co-Authored-By: Rich Ellis * added to changes.md * Update app.js to keep the HEAD request * Updated copyright Co-authored-by: Rich Ellis --- CHANGES.md | 3 +++ app.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index df1c7d98..f55892f4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,6 @@ +# 2.5.2-SNAPSHOT (2020-02-28) +- [FIXED] Issue with compatibility with Nano 8.2.0. + # 2.5.1 (2019-12-06) - [FIXED] Issue with incorrect handling of percent-encoded user info characters via @cloudant/cloudant dependency. diff --git a/app.js b/app.js index 7c3c00ec..7d969435 100644 --- a/app.js +++ b/app.js @@ -1,4 +1,4 @@ -// Copyright © 2017, 2018 IBM Corp. All rights reserved. +// Copyright © 2017, 2020 IBM Corp. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -160,7 +160,7 @@ function addEventListener(indicator, emitter, event, f) { @param {function(err)} callback - error is undefined if DB exists */ function proceedIfDbValid(db, callback) { - db.head('', function(err) { + db.server.request({ db: db.config.db, method: 'HEAD' }, function(err) { err = error.convertResponseError(err, function(err) { if (err && err.statusCode === 404) { // Override the error type and mesasge for the DB not found case