return proper error

This commit is contained in:
Chris Lu
2020-10-10 15:43:22 -07:00
parent 8e2f3b510e
commit cff8bb6554
2 changed files with 5 additions and 1 deletions

View File

@@ -58,6 +58,10 @@ func LookupFn(filerClient filer_pb.FilerClient) LookupFileIdFunctionType {
})
}
if err != nil {
return nil, err
}
for _, loc := range locations.Locations {
volumeServerAddress := filerClient.AdjustedUrl(loc.Url)
targetUrl := fmt.Sprintf("http://%s/%s", volumeServerAddress, fileId)