Comparing version 1.2.14 to 1.2.15
@@ -111,3 +111,3 @@ 'use strict'; | ||
function getPaginatedJson(uri) { | ||
return _requester2.default.get(uri).then(function (r) { | ||
return _requester2.default.get(uri).then(handleError).then(function (r) { | ||
return r.json(); | ||
@@ -122,2 +122,13 @@ }).then(function (json) { | ||
function handleError(response) { | ||
if (!response.ok) { | ||
var error = new Error(response.statusText); | ||
error.response = response; | ||
throw error; | ||
} | ||
return response; | ||
} | ||
var prepareOptions = function prepareOptions(_ref4) { | ||
@@ -124,0 +135,0 @@ var method = _ref4.method; |
@@ -150,2 +150,6 @@ 'use strict'; | ||
function parseApiPlugins(plugins, prepareConfig) { | ||
if (!Array.isArray(plugins)) { | ||
return []; | ||
} | ||
return plugins.map(function (_ref9) { | ||
@@ -152,0 +156,0 @@ var name = _ref9.name; |
{ | ||
"name": "kongfig", | ||
"version": "1.2.14", | ||
"version": "1.2.15", | ||
"description": "A tool for Kong to allow declarative configuration.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/mybuilder/kongfig", |
209913
32
3138