@ibiz-template/runtime 0.7.41-alpha.121 → 0.7.41-alpha.122

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/index.esm.js CHANGED
@@ -26132,7 +26132,18 @@ async function importData(file, appDataEntity, dataImport, context, params) {
26132
26132
  "OBJECTCREATED",
26133
26133
  "DATAIMPORT"
26134
26134
  );
26135
- Object.assign(result, res.data);
26135
+ if (res.ok && res.data) {
26136
+ Object.assign(result, res.data);
26137
+ if (res.data && res.data.errormessage && !res.data.message) {
26138
+ result.message = res.data.errormessage;
26139
+ }
26140
+ if (res.data && res.data.errorinfo && !res.data.message && !res.data.errormessage) {
26141
+ const errorInfos = Object.values(res.data.errorinfo);
26142
+ if (errorInfos.length > 0) {
26143
+ result.message = errorInfos.map((item) => item.errorInfo).join("\r\n");
26144
+ }
26145
+ }
26146
+ }
26136
26147
  } catch (error) {
26137
26148
  if (error instanceof Error) {
26138
26149
  result.errorMessage = error.message;