diff --git a/packages/grpc-native-core/index.js b/packages/grpc-native-core/index.js index 30a6ff3c2..b7deb73b7 100644 --- a/packages/grpc-native-core/index.js +++ b/packages/grpc-native-core/index.js @@ -143,6 +143,11 @@ exports.load = function load(filename, format, options) { } finally { ProtoBuf.convertFieldsToCamelCase = convertFieldsToCamelCaseOriginal; } + + if (!builder) { + throw new Error('Could not load file "' + filename + '"'); + } + return loadObject(builder.ns, options); };