Skip to content

Commit 42b1d44

Browse files
committed
protocols: Add default case for getSubgraph
This is being added to return a better error mesage for wrongly used data sources `kind`.
1 parent 96ebd19 commit 42b1d44

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/protocols/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ module.exports = class Protocol {
8888
return new EthereumSubgraph(optionsWithProtocol)
8989
case 'near':
9090
return new NearSubgraph(optionsWithProtocol)
91+
default:
92+
throw new Error(
93+
`Data sources with kind '${this.name}' are not supported yet`,
94+
)
9195
}
9296
}
9397
}

0 commit comments

Comments
 (0)