@xh/hoist 73.0.0-SNAPSHOT.1741793208717 → 73.0.0-SNAPSHOT.1741804543922

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/CHANGELOG.md CHANGED
@@ -4,11 +4,12 @@
4
4
 
5
5
  ### 🎁 New Features
6
6
 
7
- * Modify `TabContainerModel` to make more methods `protected`, improving extensibility for advanced
8
- use-cases.
9
- * Enhance `XH.reloadApp` with new argument to clear query parameters before loading.
10
- * Enhance exception handling in `FetchService` to capture messages returned as raw strings, or without
11
- explicit names.
7
+ * Modified `TabContainerModel` to make more methods `protected`, improving extensibility for
8
+ advanced use-cases.
9
+ * Enhanced `XH.reloadApp` with new argument to clear query parameters before loading.
10
+ * Enhanced exception handling in `FetchService` to capture messages returned as raw strings, or
11
+ without explicit names.
12
+ * Added dedicated columns to the Admin Console "Client Errors" tab for error names and messages.
12
13
 
13
14
  ### 🐞 Bug Fixes
14
15
 
@@ -9,7 +9,7 @@ import * as Col from '@xh/hoist/admin/columns';
9
9
  import {FilterChooserModel} from '@xh/hoist/cmp/filter';
10
10
  import {FormModel} from '@xh/hoist/cmp/form';
11
11
  import {GridModel} from '@xh/hoist/cmp/grid';
12
- import {HoistModel, LoadSpec, managed, XH} from '@xh/hoist/core';
12
+ import {HoistModel, LoadSpec, managed, PlainObject, XH} from '@xh/hoist/core';
13
13
  import {StoreRecord} from '@xh/hoist/data';
14
14
  import {fmtJson} from '@xh/hoist/format';
15
15
  import {action, bindable, comparer, computed, makeObservable, observable} from '@xh/hoist/mobx';
@@ -62,6 +62,14 @@ export class ClientErrorsModel extends HoistModel {
62
62
  {...Col.appVersion},
63
63
  {...Col.appEnvironment},
64
64
  {...Col.msg, displayName: 'User Message', hidden},
65
+ {
66
+ field: {name: 'errorName', type: 'string'},
67
+ autosizeMaxWidth: 400
68
+ },
69
+ {
70
+ field: {name: 'errorMessage', type: 'string'},
71
+ autosizeMaxWidth: 400
72
+ },
65
73
  {...Col.error, hidden},
66
74
  {...Col.url},
67
75
  {...Col.correlationId},
@@ -119,18 +127,29 @@ export class ClientErrorsModel extends HoistModel {
119
127
  }
120
128
 
121
129
  override async doLoadAsync(loadSpec: LoadSpec) {
122
- const {gridModel} = this;
130
+ const {query, gridModel} = this;
123
131
 
124
132
  try {
125
- const data = await XH.fetchService.postJson({
133
+ const data: PlainObject[] = await XH.fetchService.postJson({
126
134
  url: 'clientErrorAdmin',
127
- body: this.query,
135
+ body: query,
128
136
  loadSpec
129
137
  });
130
138
 
139
+ // Parse name + message from JSON-serialized error object out to top-level properties.
140
+ data.forEach(it => {
141
+ try {
142
+ const error = JSON.parse(it.error);
143
+ it.errorName = error?.name;
144
+ it.errorMessage = error?.message;
145
+ } catch (ignored) {}
146
+ });
147
+
131
148
  gridModel.loadData(data);
132
149
  await gridModel.preSelectFirstAsync();
133
150
  } catch (e) {
151
+ if (loadSpec.isStale || loadSpec.isAutoRefresh) return;
152
+
134
153
  gridModel.clear();
135
154
  XH.handleException(e);
136
155
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "73.0.0-SNAPSHOT.1741793208717",
3
+ "version": "73.0.0-SNAPSHOT.1741804543922",
4
4
  "description": "Hoist add-on for building and deploying React Applications.",
5
5
  "repository": "github:xh/hoist-react",
6
6
  "homepage": "https://xh.io",