@localstack/appinspector-ui 1.0.217 → 1.0.218

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.
@@ -193,6 +193,17 @@
193
193
 
194
194
  // src/utils/span-issues.ts
195
195
  var firstText = (...values) => values.find((value) => !!value) ?? void 0;
196
+ var getExceptionCode = (span) => {
197
+ const raw = span.attributes?.["localstack.aws.service.exception"];
198
+ if (typeof raw !== "string") return void 0;
199
+ try {
200
+ const exception = JSON.parse(raw);
201
+ const code = exception.code ?? exception.Code;
202
+ return typeof code === "string" ? code : void 0;
203
+ } catch {
204
+ return void 0;
205
+ }
206
+ };
196
207
  var OTEL_STATUS_ERROR = 2;
197
208
  var getIamOutcome = (span) => {
198
209
  const iamEvents = getIamEvents(span);
@@ -220,7 +231,7 @@
220
231
  const denialCount = unenforcedDenial ? Math.max(1, denials.length) : 0;
221
232
  return {
222
233
  error,
223
- errorType: error ? firstText(span.status_message, errorMessages[0]?.message) ?? (iamDenied ? "AccessDenied" : "Error") : void 0,
234
+ errorType: error ? firstText(span.status_message, errorMessages[0]?.message, getExceptionCode(span)) ?? (iamDenied ? "AccessDenied" : "Error") : void 0,
224
235
  warning,
225
236
  warningCount: warning ? Math.max(1, warningMessages.length + denialCount) : 0,
226
237
  warningType: warning ? firstText(warningMessages[0]?.message) ?? (unenforcedDenial ? `IAM ${denials[0] ?? "implicit"} deny` : iamWarned ? "IAM permission warning" : "Warning") : void 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@localstack/appinspector-ui",
3
- "version": "1.0.217",
3
+ "version": "1.0.218",
4
4
  "description": "LocalStack AppInspector UI",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",