@lowdefy/errors 0.0.0-experimental-20260822164337 → 0.0.0-experimental-20260827092002
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/index.js
CHANGED
|
@@ -47,23 +47,12 @@
|
|
|
47
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
|
-
* 7. AuthenticationError - Unauthenticated request to a protected endpoint
|
|
51
|
-
* - Thrown: API/request authorization when no caller resolved
|
|
52
|
-
* - Caught: Server error handlers, before structured logging and Sentry (401)
|
|
53
|
-
* - Format: [AuthenticationError] message
|
|
54
|
-
*
|
|
55
|
-
* 8. TwoFactorEnrolmentRequiredError - Authorized caller with no enrolled second factor
|
|
56
|
-
* - Thrown: The authorization gate, when auth.twoFactor.required is set and the caller is unenrolled
|
|
57
|
-
* - Caught: Server error handlers, before structured logging and Sentry (403)
|
|
58
|
-
* - Format: [TwoFactorEnrolmentRequiredError] message
|
|
59
|
-
*
|
|
60
50
|
* Location Resolution Utilities:
|
|
61
51
|
* resolveConfigLocation - Sync: configKey → {source, config} via keyMap/refMap
|
|
62
52
|
* resolveErrorLocation - Sync: unified resolver (configKey or filePath/lineNumber)
|
|
63
53
|
* loadAndResolveErrorLocation - Async: reads keyMap/refMap files at runtime
|
|
64
54
|
* shouldSuppressBuildCheck - Check ~ignoreBuildChecks in parent chain
|
|
65
55
|
*/ import ActionError from './ActionError.js';
|
|
66
|
-
import AuthenticationError from './AuthenticationError.js';
|
|
67
56
|
import BlockError from './BlockError.js';
|
|
68
57
|
import BuildError from './BuildError.js';
|
|
69
58
|
import ConfigError from './ConfigError.js';
|
|
@@ -78,6 +67,5 @@ import loadAndResolveErrorLocation from './loadAndResolveErrorLocation.js';
|
|
|
78
67
|
import resolveErrorLocation from './resolveErrorLocation.js';
|
|
79
68
|
import ServiceError from './ServiceError.js';
|
|
80
69
|
import shouldSuppressBuildCheck, { VALID_CHECK_SLUGS } from './shouldSuppressBuildCheck.js';
|
|
81
|
-
import TwoFactorEnrolmentRequiredError from './TwoFactorEnrolmentRequiredError.js';
|
|
82
70
|
import UserError from './UserError.js';
|
|
83
|
-
export { ActionError,
|
|
71
|
+
export { ActionError, BlockError, BuildError, ConfigError, ConfigWarning, errorToDisplayString, LowdefyInternalError, OperatorError, PluginError, RequestError, resolveConfigLocation, loadAndResolveErrorLocation, resolveErrorLocation, ServiceError, shouldSuppressBuildCheck, UserError, VALID_CHECK_SLUGS };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/errors",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-20260827092002",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Lowdefy error classes for consistent error handling across build, server, and client",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ // Thrown when a request to a protected endpoint carries no successful
|
|
16
|
-
// authentication - the caller should fix its credentials (401). The server
|
|
17
|
-
// error handlers branch on the name before the structured-log and Sentry
|
|
18
|
-
// pipeline, so probing traffic produces a one-line warning, not error logs.
|
|
19
|
-
let AuthenticationError = class AuthenticationError extends Error {
|
|
20
|
-
constructor(message = 'Authentication required.', { cause } = {}){
|
|
21
|
-
super(message, {
|
|
22
|
-
cause
|
|
23
|
-
});
|
|
24
|
-
this.name = 'AuthenticationError';
|
|
25
|
-
this.isLowdefyError = true;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
export default AuthenticationError;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ // Thrown when an authorized caller has not enrolled a second factor and the
|
|
16
|
-
// deployment sets auth.twoFactor.required. Distinct from AuthenticationError on
|
|
17
|
-
// purpose: a 401 reads to the client as a dead session and bounces the user to
|
|
18
|
-
// sign-in, which is the redirect loop the enrolment gate exists to avoid, so this
|
|
19
|
-
// maps to 403. The server error handlers branch on the name before the
|
|
20
|
-
// structured-log and Sentry pipeline - under required: true this is expected
|
|
21
|
-
// traffic from every unenrolled caller, not a fault.
|
|
22
|
-
let TwoFactorEnrolmentRequiredError = class TwoFactorEnrolmentRequiredError extends Error {
|
|
23
|
-
constructor(message = 'Two-factor enrolment required.', { cause } = {}){
|
|
24
|
-
super(message, {
|
|
25
|
-
cause
|
|
26
|
-
});
|
|
27
|
-
this.name = 'TwoFactorEnrolmentRequiredError';
|
|
28
|
-
this.isLowdefyError = true;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
export default TwoFactorEnrolmentRequiredError;
|