Skip to content

Commit 75c8413

Browse files
authored
Merge pull request #75 from envoy/storage-may-return-null
Throw more specific error in response interceptor
2 parents d26d980 + 5fc0a0f commit 75c8413

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@envoy/envoy-integrations-sdk",
3-
"version": "2.3.0",
3+
"version": "2.3.1",
44
"description": "SDK for building Envoy integrations.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/base/EnvoyAPI.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ export default class EnvoyAPI {
7575
(included || [])
7676
.concat(modelOrModels)
7777
.forEach((model: JSONAPIData) => {
78+
if (!model) {
79+
throw new Error('The data you are looking for may not exist.');
80+
}
7881
this.dataLoader.prime({ type: model.type, id: model.id }, model);
7982
const alias = TYPE_ALIASES.get(model.type);
8083
if (alias) {

0 commit comments

Comments
 (0)