Skip to content

Commit f3ad337

Browse files
committed
1.2.2
more information when rejecting getItems, like listUuid and cannot get items instead of lists message
1 parent 5c58848 commit f3ad337

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ More important methods are `getItems(listUUID)`, `saveItem(listUuid, itemName, s
3939

4040
## Changelog
4141

42+
### 1.2.2
43+
* (foxriver76) More information on rejection of getItems
44+
4245
### 1.2.1
4346
* (foxriver76) minor fix
4447

lib/bring.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/*jshint -W061 */ // ignore "eval can be harmful"
21
'use strict';
32

43
const request = require(`request-promise-native`);
@@ -68,7 +67,7 @@ class Bring {
6867
const data = await request(`${this.url}bringlists/${listUuid}`, {headers: this.headers});
6968
return Promise.resolve(JSON.parse(data));
7069
} catch (e) {
71-
return Promise.reject(`Cannot get lists: ${e}`);
70+
return Promise.reject(`Cannot get items for list ${listUuid}: ${e}`);
7271
} // endCatch
7372
} // endGetItems
7473

@@ -170,7 +169,7 @@ class Bring {
170169
} catch (e) {
171170
return Promise.reject(`Cannot get translations: ${e}`);
172171
} // endCatch
173-
} //endLoadTranslations
172+
} // endLoadTranslations
174173

175174
/**
176175
* Load translation file e. g. via 'de-DE'
@@ -184,7 +183,7 @@ class Bring {
184183
} catch (e) {
185184
return Promise.reject(`Cannot get catalog: ${e}`);
186185
} // endCatch
187-
} //endLoadCatalog
186+
} // endLoadCatalog
188187

189188
/**
190189
* Get pending invitations

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bring-shopping",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "Nodejs wrapper for the Bring! API",
55
"author": {
66
"name": "Moritz Heusinger",

0 commit comments

Comments
 (0)