@lowdefy/errors 0.0.0-experimental-20260716044341 → 0.0.0-experimental-20260716132211
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/AuthenticationError.js +28 -0
- package/dist/index.js +7 -1
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
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;
|
package/dist/index.js
CHANGED
|
@@ -47,12 +47,18 @@
|
|
|
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
|
+
*
|
|
50
55
|
* Location Resolution Utilities:
|
|
51
56
|
* resolveConfigLocation - Sync: configKey → {source, config} via keyMap/refMap
|
|
52
57
|
* resolveErrorLocation - Sync: unified resolver (configKey or filePath/lineNumber)
|
|
53
58
|
* loadAndResolveErrorLocation - Async: reads keyMap/refMap files at runtime
|
|
54
59
|
* shouldSuppressBuildCheck - Check ~ignoreBuildChecks in parent chain
|
|
55
60
|
*/ import ActionError from './ActionError.js';
|
|
61
|
+
import AuthenticationError from './AuthenticationError.js';
|
|
56
62
|
import BlockError from './BlockError.js';
|
|
57
63
|
import BuildError from './BuildError.js';
|
|
58
64
|
import ConfigError from './ConfigError.js';
|
|
@@ -68,4 +74,4 @@ import resolveErrorLocation from './resolveErrorLocation.js';
|
|
|
68
74
|
import ServiceError from './ServiceError.js';
|
|
69
75
|
import shouldSuppressBuildCheck, { VALID_CHECK_SLUGS } from './shouldSuppressBuildCheck.js';
|
|
70
76
|
import UserError from './UserError.js';
|
|
71
|
-
export { ActionError, BlockError, BuildError, ConfigError, ConfigWarning, errorToDisplayString, LowdefyInternalError, OperatorError, PluginError, RequestError, resolveConfigLocation, loadAndResolveErrorLocation, resolveErrorLocation, ServiceError, shouldSuppressBuildCheck, UserError, VALID_CHECK_SLUGS };
|
|
77
|
+
export { ActionError, AuthenticationError, 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-20260716132211",
|
|
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",
|