Skip to content

Commit

Permalink
err check loading mapping files
Browse files Browse the repository at this point in the history
  • Loading branch information
bitspill committed Dec 10, 2018
1 parent 433d57a commit 80dcb62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion datastore/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ func getHttpClient() (*http.Client, error) {

func RegisterMapping(index, fileName string) error {
index = Index(index) // apply proper prefix
mapping, _ := mapBox.FindString(fileName)
mapping, err := mapBox.FindString(fileName)
if err != nil {
panic(fmt.Sprintf("Unable to find mapping %s for index %s", fileName, index))
}
mappings[index] = mapping
if client != nil {
return createIndex(context.TODO(), index, mapping)
Expand Down

0 comments on commit 80dcb62

Please sign in to comment.