@asgardeo/javascript 0.20.0 → 0.20.1

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.
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ /**
19
+ * Attempts to extract a human-readable message from a structured API error response body.
20
+ *
21
+ * The backend returns errors in the following form:
22
+ * {"code":"...","message":{"key":"...","defaultValue":"..."},"description":{"key":"...","defaultValue":"..."}}
23
+ *
24
+ * Returns `description.defaultValue` if present, then `message.defaultValue`, and falls back
25
+ * to the raw `errorText` when the response is not a recognised structured error.
26
+ */
27
+ declare const parseApiErrorMessage: (errorText: string) => string;
28
+ export default parseApiErrorMessage;
29
+ //# sourceMappingURL=parseApiErrorMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseApiErrorMessage.d.ts","sourceRoot":"","sources":["../../src/utils/parseApiErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;GAQG;AACH,QAAA,MAAM,oBAAoB,cAAe,MAAM,KAAG,MAajD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asgardeo/javascript",
3
- "version": "0.20.0",
3
+ "version": "0.20.1",
4
4
  "description": "Framework agnostic JavaScript SDK for Asgardeo.",
5
5
  "keywords": [
6
6
  "asgardeo",