@ludo.ninja/components 2.3.23 → 2.3.25

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.
@@ -7,4 +7,4 @@ export declare enum ServerErrorType {
7
7
  NOT_FOUND = "NOT_FOUND",
8
8
  INTERNAL_ERROR = "INTERNAL_ERROR"
9
9
  }
10
- export declare const getErrorAlertProps: (error: ApolloError) => alertTypeProps;
10
+ export declare const getErrorAlertProps: (error: ApolloError) => alertTypeProps | null;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getErrorAlertProps = exports.ServerErrorType = void 0;
4
4
  const type_1 = require("../../system/Alert/type");
5
+ const env_1 = require("../env");
5
6
  var ServerErrorType;
6
7
  (function (ServerErrorType) {
7
8
  ServerErrorType["BAD_REQUEST"] = "BAD_REQUEST";
@@ -23,10 +24,10 @@ const getErrorAlertProps = (error) => {
23
24
  };
24
25
  case ServerErrorType.INTERNAL_ERROR:
25
26
  default:
26
- return {
27
+ return !(0, env_1.isProdFromEnvForServer)() ? {
27
28
  type: type_1.alertVariants.error,
28
29
  caption: error.cause?.message || error.message,
29
- };
30
+ } : null;
30
31
  }
31
32
  };
32
33
  exports.getErrorAlertProps = getErrorAlertProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.3.23",
3
+ "version": "2.3.25",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",