THRIFT-4024: Skip() throws TProtocolException.INVALID_DATA on unknown data types
Client: js

This closes #1503
diff --git a/lib/js/src/thrift.js b/lib/js/src/thrift.js
index eeae873..2b385a3 100644
--- a/lib/js/src/thrift.js
+++ b/lib/js/src/thrift.js
@@ -1438,6 +1438,9 @@
                 }
                 this.readListEnd();
                 return null;
+
+            default:
+                throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.INVALID_DATA);
         }
     }
 };