diff --git a/lib/generator.js b/lib/generator.js
index <HASH>..<HASH> 100644
--- a/lib/generator.js
+++ b/lib/generator.js
@@ -85,8 +85,14 @@
             });
 
             self._photoshop.on("error", function (err) {
-                // TODO: Gracefully shut down
                 self.publish("photoshop.error", err);
+                // If the error does refers to a specific command we ran, reject the corresponding deferred
+                if (err.body && err.id) {
+                    if (self._jsMessageDeferreds[err.id]) {
+                        self._jsMessageDeferreds[err.id].reject(err.body);
+                    }
+                }
+                // TODO: Otherwise, gracefully shut down?
             });
 
             self._photoshop.on("communicationsError", function (err, rawMessage) {
Reject a command's deferred if we receive a related error message