@lowdefy/errors 0.0.0-experimental-20260909201552 → 0.0.0-experimental-20260910082708

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
@@ -56,13 +56,8 @@
56
56
  * - Caught: Server error handlers, before structured logging and Sentry (401)
57
57
  * - Format: [AuthenticationError] message
58
58
  *
59
- * 8. TwoFactorEnrolmentRequiredError - Authorized caller with no enrolled second factor
60
- * - Thrown: The authorization gate, when auth.twoFactor.required is set and the caller is unenrolled
61
- * - Caught: Server error handlers, before structured logging and Sentry (403)
62
- * - Format: [TwoFactorEnrolmentRequiredError] message
63
- *
64
- * 9. AuthorizationError - Authenticated caller refused by an authorization gate (wrong roles)
65
- * - Thrown: Request, endpoint, agent, websocket and auth-step authorization gates
59
+ * 8. AuthorizationError - Authenticated caller refused by an authorization gate (wrong roles)
60
+ * - Thrown: Request, endpoint, agent and auth-step authorization gates
66
61
  * - Caught: Server error handlers, before structured logging and Sentry (403)
67
62
  * - Format: [AuthorizationError] message
68
63
  *
@@ -88,6 +83,5 @@ import loadAndResolveErrorLocation from './loadAndResolveErrorLocation.js';
88
83
  import resolveErrorLocation from './resolveErrorLocation.js';
89
84
  import ServiceError from './ServiceError.js';
90
85
  import shouldSuppressBuildCheck, { VALID_CHECK_SLUGS } from './shouldSuppressBuildCheck.js';
91
- import TwoFactorEnrolmentRequiredError from './TwoFactorEnrolmentRequiredError.js';
92
86
  import UserError from './UserError.js';
93
- export { ActionError, AuthenticationError, AuthorizationError, BlockError, BuildError, ConfigError, ConfigWarning, errorToDisplayString, LowdefyInternalError, OperatorError, PluginError, RequestError, resolveConfigLocation, loadAndResolveErrorLocation, resolveErrorLocation, ServiceError, shouldSuppressBuildCheck, TwoFactorEnrolmentRequiredError, UserError, VALID_CHECK_SLUGS };
87
+ export { ActionError, AuthenticationError, AuthorizationError, 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-20260909201552",
3
+ "version": "0.0.0-experimental-20260910082708",
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,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;