Try our conversational search powered by Generative AI!

Improve error message in DefaultShippingCalculator

Fixed in

EPiServer.Commerce 13.12.0

(Or a related package)

Created

Oct 04, 2019

Updated

Dec 20, 2019

State

Closed, Fixed and tested


Description

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.