@praxisui/core 9.0.5-rc.29 → 9.0.5-rc.30

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-08-16T01:02:42.425Z",
3
+ "generatedAt": "2026-08-17T01:10:49.556Z",
4
4
  "packageName": "@praxisui/core",
5
- "packageVersion": "9.0.5-rc.29",
5
+ "packageVersion": "9.0.5-rc.30",
6
6
  "sourceRegistry": "praxis-component-registry-ingestion",
7
7
  "sourceRegistryVersion": "1.0.0",
8
8
  "componentCount": 4,
@@ -12231,8 +12231,14 @@ class ErrorMessageService {
12231
12231
  }
12232
12232
  normalizeSubmitError(error) {
12233
12233
  const status = this.numberValue(error?.status);
12234
- const payload = this.objectValue(error?.error) ?? this.objectValue(error);
12235
- const details = this.normalizeDetails(payload?.['errors']);
12234
+ const errorObject = this.objectValue(error);
12235
+ const responsePayload = this.objectValue(errorObject?.['error']);
12236
+ const payload = responsePayload
12237
+ ?? (Array.isArray(errorObject?.['errors']) ? errorObject : undefined);
12238
+ const isPublicClientError = status !== undefined && status >= 400 && status < 500;
12239
+ const details = isPublicClientError
12240
+ ? this.normalizeDetails(payload?.['errors'])
12241
+ : [];
12236
12242
  if (details.length) {
12237
12243
  return {
12238
12244
  message: this.textValue(payload?.['message']) ?? details[0].message,
@@ -12240,10 +12246,10 @@ class ErrorMessageService {
12240
12246
  };
12241
12247
  }
12242
12248
  const publicMessage = this.textValue(payload?.['message']);
12243
- if (publicMessage && status !== undefined && status >= 400 && status < 500) {
12249
+ if (publicMessage && isPublicClientError) {
12244
12250
  return { message: publicMessage, details: [] };
12245
12251
  }
12246
- return { message: this.fallbackMessage(error, status), details: [] };
12252
+ return { message: this.fallbackMessage(status), details: [] };
12247
12253
  }
12248
12254
  /**
12249
12255
  * Returns a generic message for an error returned during a form submit.
@@ -12252,7 +12258,7 @@ class ErrorMessageService {
12252
12258
  getSubmitErrorMessage(error) {
12253
12259
  return this.normalizeSubmitError(error).message;
12254
12260
  }
12255
- fallbackMessage(error, status) {
12261
+ fallbackMessage(status) {
12256
12262
  if (status === 0) {
12257
12263
  return this.tx('global.submitError.network', 'Não foi possível conectar ao servidor. Verifique sua conexão ou se o servidor está disponível.');
12258
12264
  }
@@ -12262,9 +12268,7 @@ class ErrorMessageService {
12262
12268
  if (status === 400 || status === 422) {
12263
12269
  return this.tx('global.submitError.invalidData', 'Dados inválidos ou inconsistentes. Verifique os campos e tente novamente.');
12264
12270
  }
12265
- return status === undefined
12266
- ? this.textValue(error?.message) ?? this.genericSubmitError()
12267
- : this.genericSubmitError();
12271
+ return this.genericSubmitError();
12268
12272
  }
12269
12273
  normalizeDetails(value) {
12270
12274
  if (!Array.isArray(value))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praxisui/core",
3
- "version": "9.0.5-rc.29",
3
+ "version": "9.0.5-rc.30",
4
4
  "description": "Core library for Praxis UI Workspace: types, tokens, services and utilities shared across @praxisui/* packages.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",