Skip to content

Commit

Permalink
Output an error if at least one option is specified incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
Dariquest committed Jan 28, 2025
1 parent 917e74b commit 7be6622
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion command/v7/map_route_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (cmd MapRouteCommand) Execute(args []string) error {
cmd.UI.DisplayOK()
} else {
if cmd.Options != nil && len(cmd.Options) > 0 {
return actionerror.RouteOptionSupportError{"Route specific options can only be specified for nonexistent routes."}
return actionerror.RouteOptionSupportError{ErrorText: "Route specific options can only be specified for nonexistent routes."}
}
}

Expand Down
2 changes: 1 addition & 1 deletion command/v7/map_route_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ var _ = Describe("map-route Command", func() {
fakeActor.GetRouteDestinationByAppGUIDReturns(resources.RouteDestination{}, nil)
})
It("returns the error message", func() {
Expect(executeErr).To(MatchError(actionerror.RouteOptionSupportError{"Route specific options can only be specified for nonexistent routes."}))
Expect(executeErr).To(MatchError(actionerror.RouteOptionSupportError{ErrorText: "Route specific options can only be specified for nonexistent routes."}))
Expect(fakeActor.MapRouteCallCount()).To(Equal(0))
})
})
Expand Down

0 comments on commit 7be6622

Please sign in to comment.