@sumaris-net/ngx-components 2.4.90-rc1 → 2.4.90-rc2
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/esm2020/src/app/core/graphql/graphql.service.mjs +12 -4
- package/fesm2015/sumaris-net.ngx-components.mjs +9 -2
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +11 -3
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -16978,7 +16978,7 @@ class GraphqlService extends StartableService {
|
|
|
16978
16978
|
if (message) {
|
|
16979
16979
|
return {
|
|
16980
16980
|
code: errorCode,
|
|
16981
|
-
message
|
|
16981
|
+
message
|
|
16982
16982
|
};
|
|
16983
16983
|
}
|
|
16984
16984
|
return undefined;
|
|
@@ -17023,10 +17023,18 @@ class GraphqlService extends StartableService {
|
|
|
17023
17023
|
}
|
|
17024
17024
|
}
|
|
17025
17025
|
if (error && error.code) {
|
|
17026
|
-
|
|
17027
|
-
|
|
17026
|
+
const appError = {
|
|
17027
|
+
code: error.code,
|
|
17028
|
+
message: (typeof message === 'string') ? message : undefined,
|
|
17028
17029
|
...this.createAppErrorByCode(error.code)
|
|
17029
17030
|
};
|
|
17031
|
+
if (appError.code !== error.code || appError.message !== error.message) {
|
|
17032
|
+
// Store original error in details
|
|
17033
|
+
appError.details = error;
|
|
17034
|
+
return appError;
|
|
17035
|
+
}
|
|
17036
|
+
// Keep error (with details, if any)
|
|
17037
|
+
return error;
|
|
17030
17038
|
}
|
|
17031
17039
|
return undefined;
|
|
17032
17040
|
}
|