@lowdefy/errors 5.3.0 → 5.4.0
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.
- package/dist/UserError.js +5 -2
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/UserError.js
CHANGED
|
@@ -13,11 +13,14 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ let UserError = class UserError extends Error {
|
|
16
|
-
constructor(message, { blockId, metaData, pageId } = {}){
|
|
17
|
-
super(message
|
|
16
|
+
constructor(message, { blockId, cause, isReject = false, metaData, pageId } = {}){
|
|
17
|
+
super(message, {
|
|
18
|
+
cause
|
|
19
|
+
});
|
|
18
20
|
this.name = 'UserError';
|
|
19
21
|
this.isLowdefyError = true;
|
|
20
22
|
this.blockId = blockId;
|
|
23
|
+
this.isReject = isReject;
|
|
21
24
|
this.metaData = metaData;
|
|
22
25
|
this.pageId = pageId;
|
|
23
26
|
}
|
package/dist/index.js
CHANGED
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
* - Extends ConfigError with name override
|
|
43
43
|
* - Format: source:line\n[ConfigWarning] message
|
|
44
44
|
*
|
|
45
|
-
* 6. UserError -
|
|
46
|
-
* - Thrown:
|
|
47
|
-
* - Caught:
|
|
45
|
+
* 6. UserError - User-authored deliberate failure
|
|
46
|
+
* - Thrown: Client-side Throw action; server-side controlThrow (routine :throw) and controlReject (routine :reject)
|
|
47
|
+
* - Caught: Caller of the action/resolver; signals "the called routine deliberately failed" as distinct from a system fault
|
|
48
48
|
* - Format: [User Error] message
|
|
49
49
|
*
|
|
50
50
|
* Location Resolution Utilities:
|
package/package.json
CHANGED