Skip to content

Commit

Permalink
fix: improved error messages for call command
Browse files Browse the repository at this point in the history
Before this commit, running `garden call some-service` when
`some-service` defines no ingresses would result in a cryptic error
message (`Cannot read property 'path' of undefined`).

Now, the command outputs `Service user has no active ingresses` in such
cases instead.
  • Loading branch information
thsig committed Jun 6, 2019
1 parent 6f4b667 commit 2286a17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion garden-service/src/commands/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class CallCommand extends Command<Args> {
})
}

if (!status.ingresses) {
if (!status.ingresses || status.ingresses.length === 0) {
throw new ParameterError(`Service ${service.name} has no active ingresses`, {
serviceName: service.name,
serviceStatus: status,
Expand Down

0 comments on commit 2286a17

Please sign in to comment.