Skip to content

Commit b503cfa

Browse files
committed
check if response contains any keys
1 parent a3f0643 commit b503cfa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

installationproxy.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ func (p *InstallationProxy) LookupApplication(bundleID string, attributes []stri
237237
return nil, fmt.Errorf("lookup status: %s", resp.Status)
238238
}
239239

240+
if len(resp.LookupResult) == 0 {
241+
return nil, fmt.Errorf("bundle does not exist")
242+
}
243+
240244
data, ok := resp.LookupResult[bundleID].(map[string]interface{})
241245
if !ok {
242246
return nil, fmt.Errorf("lookup error: %v", err)

0 commit comments

Comments
 (0)