Improve error message in DefaultShippingCalculator

Fixed in

EPiServer.Commerce 13.12.0


Oct 04, 2019


Dec 20, 2019


Closed, Fixed and tested


Reported from a customer to Bob Bolt

In the GetShippingRate() method of DefaultShippingCalculator class, if container couldn't find any implementation registered for IShippingPlugin and IShippingGateway for a shipping method, it actually throws an exception:

throw new InvalidOperationException($"{row.ShippingOptionRow.ClassName} does not implement {nameof(IShippingPlugin)} nor {nameof(IShippingGateway)}.");

Actually the word "implement" is not really true. It might be that the class with "ClassName" already implements interfaces, but it was not registered (configured for those interfaces). We should update that.

And maybe we have to emphasize that in relevant articles on World.