Skip to content
This repository has been archived by the owner on Jun 19, 2018. It is now read-only.

Commit

Permalink
Handle new DLL error
Browse files Browse the repository at this point in the history
  • Loading branch information
christianalfoni committed Apr 9, 2017
1 parent c24be08 commit ad15689
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/sandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var sandbox = {
res.sendStatus(200);
})
.catch(function (err) {
if (err.code === 'ETIMEDOUT') {
if (err.code === 'ETIMEDOUT' || err.message === 'PACKAGER_NOT_AVAILABLE') {
res.sendStatus(503);
} else {
res.status(500).send(err.message);
Expand Down
4 changes: 0 additions & 4 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,13 @@ var utils = {
getManifest: function (packages) {
return new Promise(function (resolve, reject) {
var time = Date.now()
console.log('Getting manifest from: ' + config.dllServiceUrl + '/' + encodeURIComponent(utils.getDllName(packages)) + '/manifest.json');
request(config.dllServiceUrl + '/' + encodeURIComponent(utils.getDllName(packages)) + '/manifest.json', function(err, resp, body) {
if (err) {
console.log('Manifest ERROR', err.code, err.message);
reject(err);

return;
}

console.log('Got manifest in ' + (Date.now() - time) + 'ms');
console.log(JSON.stringify(resp.headers));
if (resp.statusCode === 200) {
resolve(JSON.parse(body));
} else {
Expand Down

0 comments on commit ad15689

Please sign in to comment.