@sap-ux/inquirer-common 0.6.1 → 0.6.2

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.
@@ -28,7 +28,7 @@ export declare enum ERROR_TYPE {
28
28
  ODATA_URL_NOT_FOUND = "ODATA_URL_NOT_FOUND",
29
29
  BAD_GATEWAY = "BAD_GATEWAY",// Can be caused by either local issue or endpoint configuration
30
30
  INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR",
31
- DESTINATION_BAD_GATEWAY_503 = "DESTINATION_BAD_GATEWAY_503",// Caused by endpoint using a firewall or proxy
31
+ DESTINATION_SERVICE_UNAVAILABLE = "DESTINATION_SERVICE_UNAVAILABLE",// Caused by endpoint using a firewall or proxy
32
32
  DESTINATION_UNAVAILABLE = "DESTINATION_UNAVAILABLE",
33
33
  DESTINATION_NOT_FOUND = "DESTINATION_NOT_FOUND",
34
34
  DESTINATION_MISCONFIGURED = "DESTINATION_MISCONFIGURED",
@@ -38,7 +38,7 @@ var ERROR_TYPE;
38
38
  ERROR_TYPE["ODATA_URL_NOT_FOUND"] = "ODATA_URL_NOT_FOUND";
39
39
  ERROR_TYPE["BAD_GATEWAY"] = "BAD_GATEWAY";
40
40
  ERROR_TYPE["INTERNAL_SERVER_ERROR"] = "INTERNAL_SERVER_ERROR";
41
- ERROR_TYPE["DESTINATION_BAD_GATEWAY_503"] = "DESTINATION_BAD_GATEWAY_503";
41
+ ERROR_TYPE["DESTINATION_SERVICE_UNAVAILABLE"] = "DESTINATION_SERVICE_UNAVAILABLE";
42
42
  ERROR_TYPE["DESTINATION_UNAVAILABLE"] = "DESTINATION_UNAVAILABLE";
43
43
  ERROR_TYPE["DESTINATION_NOT_FOUND"] = "DESTINATION_NOT_FOUND";
44
44
  ERROR_TYPE["DESTINATION_MISCONFIGURED"] = "DESTINATION_MISCONFIGURED";
@@ -86,7 +86,7 @@ exports.ERROR_MAP = {
86
86
  [ERROR_TYPE.ODATA_URL_NOT_FOUND]: [],
87
87
  [ERROR_TYPE.INTERNAL_SERVER_ERROR]: [/500/],
88
88
  [ERROR_TYPE.BAD_GATEWAY]: [/502/],
89
- [ERROR_TYPE.DESTINATION_BAD_GATEWAY_503]: [],
89
+ [ERROR_TYPE.DESTINATION_SERVICE_UNAVAILABLE]: [],
90
90
  [ERROR_TYPE.DESTINATION_UNAVAILABLE]: [],
91
91
  [ERROR_TYPE.DESTINATION_NOT_FOUND]: [],
92
92
  [ERROR_TYPE.DESTINATION_MISCONFIGURED]: [],
@@ -207,7 +207,7 @@ class ErrorHandler {
207
207
  }),
208
208
  [ERROR_TYPE.NO_V2_SERVICES]: () => (0, i18n_1.t)('errors.noServicesAvailable', { version: '2' }),
209
209
  [ERROR_TYPE.NO_V4_SERVICES]: () => (0, i18n_1.t)('errors.noServicesAvailable', { version: '4' }),
210
- [ERROR_TYPE.DESTINATION_BAD_GATEWAY_503]: () => (0, i18n_1.t)('errors.destination.unavailable'),
210
+ [ERROR_TYPE.DESTINATION_SERVICE_UNAVAILABLE]: () => (0, i18n_1.t)('errors.destination.unavailable'),
211
211
  [ERROR_TYPE.REDIRECT]: () => (0, i18n_1.t)('errors.redirectError'),
212
212
  [ERROR_TYPE.NO_SUCH_HOST]: () => (0, i18n_1.t)('errors.noSuchHostError'),
213
213
  [ERROR_TYPE.NO_ABAP_ENVS]: () => (0, i18n_1.t)('errors.abapEnvsUnavailable'),
@@ -251,7 +251,7 @@ class ErrorHandler {
251
251
  [ERROR_TYPE.DESTINATION_UNAVAILABLE]: guided_answers_helper_1.HELP_NODES.DESTINATION_UNAVAILABLE,
252
252
  [ERROR_TYPE.DESTINATION_NOT_FOUND]: guided_answers_helper_1.HELP_NODES.DESTINATION_NOT_FOUND,
253
253
  [ERROR_TYPE.BAD_GATEWAY]: guided_answers_helper_1.HELP_NODES.BAD_GATEWAY,
254
- [ERROR_TYPE.DESTINATION_BAD_GATEWAY_503]: guided_answers_helper_1.HELP_NODES.DESTINATION_BAD_GATEWAY_503,
254
+ [ERROR_TYPE.DESTINATION_SERVICE_UNAVAILABLE]: guided_answers_helper_1.HELP_NODES.DESTINATION_SERVICE_UNAVAILBLE,
255
255
  [ERROR_TYPE.NO_V4_SERVICES]: guided_answers_helper_1.HELP_NODES.NO_V4_SERVICES,
256
256
  [ERROR_TYPE.AUTH]: undefined,
257
257
  [ERROR_TYPE.AUTH_TIMEOUT]: undefined,
@@ -475,7 +475,7 @@ class ErrorHandler {
475
475
  this.currentErrorMsg = null;
476
476
  this.currentErrorType = null;
477
477
  }
478
- return errorHelp ?? resolvedErrorMsg; // We mau not have a help link, so return the resolvedend user message
478
+ return errorHelp ?? resolvedErrorMsg; // We may not have a help link, so return the resolved end user message
479
479
  }
480
480
  /**
481
481
  * Get a more specific error type for the specified destination.
@@ -494,7 +494,7 @@ class ErrorHandler {
494
494
  }
495
495
  else if (errorType === ERROR_TYPE.SERVICE_UNAVAILABLE) {
496
496
  if ((0, btp_utils_1.isOnPremiseDestination)(destination)) {
497
- destErrorType = ERROR_TYPE.DESTINATION_BAD_GATEWAY_503; // Remap to specific gateway to allow GA link to be associated
497
+ destErrorType = ERROR_TYPE.DESTINATION_SERVICE_UNAVAILABLE; // Remap to specific gateway to allow GA link to be associated
498
498
  }
499
499
  else {
500
500
  destErrorType = ERROR_TYPE.DESTINATION_CONNECTION_ERROR; // General destination connection error, GA link to connection page
@@ -502,9 +502,9 @@ class ErrorHandler {
502
502
  }
503
503
  else if (errorType === ERROR_TYPE.NOT_FOUND) {
504
504
  destErrorType = ERROR_TYPE.DESTINATION_NOT_FOUND;
505
+ destErrorMsg = this.getErrorMsgFromType(ERROR_TYPE.DESTINATION_NOT_FOUND);
505
506
  }
506
507
  else if (ERROR_TYPE.INTERNAL_SERVER_ERROR === errorType || ERROR_TYPE.SERVER_HTTP_ERROR === errorType) {
507
- // We cannot tell in BAS what this means, so we will just say the connection failed
508
508
  destErrorType = ERROR_TYPE.DESTINATION_CONNECTION_ERROR;
509
509
  }
510
510
  else if (errorType === ERROR_TYPE.AUTH && destination.Authentication !== btp_utils_1.Authentication.NO_AUTHENTICATION) {
@@ -8,7 +8,7 @@
8
8
  "errors": {
9
9
  "destination": {
10
10
  "unavailable": "The selected destination references an instance that is not available. Please check your destination configuration and try again.",
11
- "notFound": "The destination is misconfigured, HTTP Error 404 returned, the requested resource could not be found.",
11
+ "notFound": "The destination target URL cannot be found. The request failed with status code 404. Please check the destination target URL connectivity in your BTP cockpit.",
12
12
  "notReachable": "The selected system is not reachable. System name: {{systemName}}, error: {{- error}}",
13
13
  "misconfigured": "The destination is misconfigured. $t(errors.destination.missingPropMsg, {\"destinationProperty\": \"{{destinationProperty}}\" })",
14
14
  "missingPropMsg": "The property: `{{destinationProperty}}` is missing.",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/inquirer-common",
3
3
  "description": "Commonly used shared functionality and types to support inquirer modules.",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -31,7 +31,7 @@
31
31
  "@sap-ux/btp-utils": "0.17.2",
32
32
  "@sap-ux/feature-toggle": "0.2.3",
33
33
  "@sap-ux/fiori-generator-shared": "0.7.18",
34
- "@sap-ux/guided-answers-helper": "0.1.1",
34
+ "@sap-ux/guided-answers-helper": "0.2.0",
35
35
  "@sap-ux/telemetry": "0.5.50",
36
36
  "@sap-ux/logger": "0.6.0",
37
37
  "@sap-ux/ui5-info": "0.8.3"