diff --git a/ui/packages/consul-ui/app/utils/create-fingerprinter.js b/ui/packages/consul-ui/app/utils/create-fingerprinter.js index 263b349f2a..d0f103dcfb 100644 --- a/ui/packages/consul-ui/app/utils/create-fingerprinter.js +++ b/ui/packages/consul-ui/app/utils/create-fingerprinter.js @@ -5,14 +5,19 @@ export default function(foreignKey, nspaceKey, partitionKey, hash = JSON.stringi return function(item) { foreignKeyValue = foreignKeyValue == null ? item[foreignKey] : foreignKeyValue; if (foreignKeyValue == null) { - throw new Error('Unable to create fingerprint, missing foreignKey value'); + throw new Error( + `Unable to create fingerprint, missing foreignKey value. Looking for value in \`${foreignKey}\` got \`${foreignKeyValue}\`` + ); } const slugKeys = slugKey.split(','); const slugValues = slugKeys.map(function(slugKey) { - if (get(item, slugKey) == null || get(item, slugKey).length < 1) { - throw new Error('Unable to create fingerprint, missing slug'); + const slug = get(item, slugKey); + if (slug == null || slug.length < 1) { + throw new Error( + `Unable to create fingerprint, missing slug. Looking for value in \`${slugKey}\` got \`${slug}\`` + ); } - return get(item, slugKey); + return slug; }); // This ensures that all data objects have a Namespace and a Partition // value set, even in OSS.