Skip to content

Commit db81ea2

Browse files
Don't handle errors in the API layer
The previous version would cause fatal errors, even when only a 404 was raised (like when strider.json doesn't exist). Other providers (like github) will only raise errors on connection errors. This provider should behave the same way.
1 parent fcd6d35 commit db81ea2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/api.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ function get(config, uri, callback) {
2727
if (err) {
2828
return callback(err);
2929
}
30-
31-
if (res.statusCode !== 200) {
32-
return callback(new Error("Cannot access GitLab API. Please verify your private token. (Status:" + res.statusCode + ")"));
33-
}
34-
30+
3531
callback(undefined, res.body);
3632
});
3733
}

0 commit comments

Comments
 (0)