diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -222,7 +222,7 @@ function rebuild(psModule) {
       if (!Array.isArray(res.result)) {
         return res.resultType === 'success'
                ? resolve(psModule)
-               : reject(res.result)
+               : reject(res)
       }
 
       Promise.map(res.result, (item, i) => {
@@ -232,7 +232,7 @@ function rebuild(psModule) {
       .then(compileMessages => {
         if (res.resultType === 'error') {
           cache.errors = compileMessages
-          reject(res.result)
+          reject(res)
         } else {
           cache.warnings = compileMessages
           resolve(psModule)
Recompile on when psc-client-ide receives UnknownModule.