Skip to content

Unhandled error, when running cf html5-list -a with non-existing application name #19

@micellius

Description

@micellius

Description

Running cf html5-list -a <app_name_with_typo> causing panic error with error stack trace.
An appropriate error message is expected instead.

Environment

  • OS (macOS/Windows) - macOS
  • Plugin version - 1.3.0
  • SAP CF Landscape (e.g. Canary) - Canary
  • IaaS provider (e.g. AWS) - AWS
  • Region (e.g. eu10) - eu10

CLI Output

$ cf html5-list -a xyz
Getting list of HTML5 application available in scope of application xyz in org org / space space as user...
panic: runtime error: index out of range

goroutine 1 [running]:
cf-html5-apps-repo-cli-plugin/clients.GetApplication(0x14ed0c0, 0xc00012c180, 0xc000190210, 0x24, 0x7ffeefbff5f4, 0x3, 0x1820f48, 0x0, 0x0)
	/cf-html5-apps-repo-cli-plugin/clients/get_application.go:32 +0x3dd
cf-html5-apps-repo-cli-plugin/commands.(*ListCommand).ListAppApps(0x1802c80, 0x7ffeefbff5f4, 0x3, 0x0, 0x1821b60)
	/cf-html5-apps-repo-cli-plugin/commands/html5_list_command.go:198 +0xda7
cf-html5-apps-repo-cli-plugin/commands.(*ListCommand).Execute(0x1802c80, 0xc000010080, 0x2, 0x2, 0xc00012c180)
	/cf-html5-apps-repo-cli-plugin/commands/html5_list_command.go:115 +0x919
main.(*HTML5Plugin).Run(0x1820f48, 0x14ed0c0, 0xc00012c180, 0xc000010070, 0x3, 0x3)
	/cf-html5-apps-repo-cli-plugin/html5_plugin.go:45 +0x1b1
cf-html5-apps-repo-cli-plugin/vendor/github.com/cloudfoundry/cli/plugin.Start(0x14e66c0, 0x1820f48)
	/cf-html5-apps-repo-cli-plugin/vendor/github.com/cloudfoundry/cli/plugin/plugin_shim.go:30 +0x276
main.main()
	/cf-html5-apps-repo-cli-plugin/html5_plugin.go:65 +0x3d

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions