diff --git a/command/v7/map_route_command.go b/command/v7/map_route_command.go index 9ce281aa0f..6ce25da464 100644 --- a/command/v7/map_route_command.go +++ b/command/v7/map_route_command.go @@ -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."} } } diff --git a/command/v7/map_route_command_test.go b/command/v7/map_route_command_test.go index f1686c1584..1a3fcfb135 100644 --- a/command/v7/map_route_command_test.go +++ b/command/v7/map_route_command_test.go @@ -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)) }) })