Skip to content

Commit ed3c1ea

Browse files
climbusandrzejkrzywda
authored andcommitted
fix exception: uninitialized constant
When posted wrong vat code: NameError (uninitialized constant Invoicing::Product::VatRateNotApplicable) But still not working because of https://github.com/RailsEventStore/ecommerce/blob/master/rails_application/app/controllers/products_controller.rb#L45 and exception: [Infra::Types::VatRate.new] :code is missing in Hash input ;)
1 parent 0af1cae commit ed3c1ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rails_application/app/controllers/products_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def create
2323
rescue ProductCatalog::AlreadyRegistered
2424
flash[:notice] = "Product was already registered"
2525
render "new"
26-
rescue Invoicing::Product::VatRateNotApplicable
26+
rescue Taxes::Product::VatRateNotApplicable
2727
flash[:notice] = "Selected VAT rate not applicable"
2828
render "new"
2929
else

0 commit comments

Comments
 (0)