diff --git a/lib/solidus_shipwire/shipwireable/shipwire_api.rb b/lib/solidus_shipwire/shipwireable/shipwire_api.rb
index <HASH>..<HASH> 100644
--- a/lib/solidus_shipwire/shipwireable/shipwire_api.rb
+++ b/lib/solidus_shipwire/shipwireable/shipwire_api.rb
@@ -66,6 +66,8 @@ module SolidusShipwire
         end
 
         def update_on_shipwire
+          raise "shipwire id is nil" if shipwire_id.nil?
+
           self.class.update_on_shipwire(shipwire_id, to_shipwire_json)
         end
 
diff --git a/spec/support/shared_examples/shipwireable_api_instance.rb b/spec/support/shared_examples/shipwireable_api_instance.rb
index <HASH>..<HASH> 100644
--- a/spec/support/shared_examples/shipwireable_api_instance.rb
+++ b/spec/support/shared_examples/shipwireable_api_instance.rb
@@ -41,6 +41,11 @@ shared_examples "shipwireable api instance" do
 
       is_expected.to be_a Shipwire::Response
     end
+
+    context "when shipwire_id is nil" do
+      let(:shipwire_id) { nil }
+      it { expect{ subject }.to raise_error(RuntimeError) }
+    end
   end
 
   describe "#update_shipwire_id" do
Raise error if shipwire id is missing