Merge branch 'dev' into 'master'
Separate handling errors Closes #16 See merge request !2
This commit is contained in:
commit
6126222e8f
|
@ -24,7 +24,11 @@ module.exports.create = function (deps) {
|
||||||
function getTerms(err, res) {
|
function getTerms(err, res) {
|
||||||
var links;
|
var links;
|
||||||
|
|
||||||
if (err || Math.floor(res.statusCode/100)!==2) {
|
if (err) {
|
||||||
|
return handleErr(err, 'Registration request failed: ' + err.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Math.floor(res.statusCode/100)!==2) {
|
||||||
return handleErr(err, 'Registration request failed: ' + res.body.toString('utf8'));
|
return handleErr(err, 'Registration request failed: ' + res.body.toString('utf8'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue