Skip to content

Commit

Permalink
Be more resilient against error types
Browse files Browse the repository at this point in the history
  • Loading branch information
Munter committed Oct 20, 2016
1 parent 38dafc8 commit ad759ef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,17 @@ module.exports = function (options) {
});

function handleError(error) {
if (error.message.indexOf('AssetGraph.ensureAssetConfigHasType: Couldn\'t load') === 0) {
var message = error.message || error;

if (message.indexOf('AssetGraph.ensureAssetConfigHasType: Couldn\'t load') === 0) {
return;
}


var report = {
ok: false,
name: ('should not have any errors loading ' + (error.relation ? 'relation' : 'asset')),
operator: 'error',
actual: error.message
actual: message
};

if (error.asset) {
Expand Down

0 comments on commit ad759ef

Please sign in to comment.