@creejs/commons-lang 2.1.29 → 2.1.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,6 +38,16 @@
38
38
  return err._type === '_' && typeof err.code === 'number'
39
39
  }
40
40
 
41
+ /**
42
+ *
43
+ * @param {string} message
44
+ * @param {number} time ms
45
+ * @returns {_Error}
46
+ */
47
+ static timeout (message, time) {
48
+ return new _Error(`Timeout ${time}ms: ${message}`, 504)
49
+ }
50
+
41
51
  /**
42
52
  * "412 Precondition Failed" indicates that one or more conditions
43
53
  * given in the request header fields evaluated to false when tested on the server.
@@ -50,8 +60,8 @@
50
60
  * @param {string} message
51
61
  * @returns {_Error}
52
62
  */
53
- static PreconditionFailed (message) {
54
- return new _Error(`Not Found: ${message}`, 412)
63
+ static preconditionFailed (message) {
64
+ return new _Error(`Not Matched: ${message}`, 412)
55
65
  }
56
66
 
57
67
  /**