diff --git a/server/src/locales/en.json b/server/src/locales/en.json index 22ab0d157..1345f84a8 100755 --- a/server/src/locales/en.json +++ b/server/src/locales/en.json @@ -149,10 +149,12 @@ "statusPageByTeamId": "Got status pages by team id successfully", "httpNetworkError": "Network error", "httpNotJson": "Response data is not json", + "httpExpectedValueFail": "Expected value did not match", "httpJsonPathError": "Failed to parse json data", "httpEmptyResult": "Result is empty", "httpMatchSuccess": "Response data match successfully", "httpMatchFail": "Failed to match response data", + "httpJsonPathFail": "JSONPath did not match expected value", "webhookSendSuccess": "Webhook notification sent successfully", "telegramRequiresBotTokenAndChatId": "Telegram notifications require both botToken and chatId", "webhookUrlRequired": "Webhook URL is required", diff --git a/server/src/service/infrastructure/networkService.js b/server/src/service/infrastructure/networkService.js index 2b0b15059..47ef6878f 100644 --- a/server/src/service/infrastructure/networkService.js +++ b/server/src/service/infrastructure/networkService.js @@ -165,7 +165,7 @@ class NetworkService { } else { httpResponse.code = 500; httpResponse.status = false; - httpResponse.message = this.stringService.httpExpectedValueFail || "Expected value did not match"; + httpResponse.message = this.stringService.httpExpectedValueFail; return httpResponse; } } @@ -192,7 +192,7 @@ class NetworkService { } else { httpResponse.status = false; httpResponse.code = 500; - httpResponse.message = this.stringService.httpJsonPathFail || "JSONPath did not match expected value"; + httpResponse.message = this.stringService.httpJsonPathFail; httpResponse.extracted = extracted; return httpResponse; } @@ -204,7 +204,7 @@ class NetworkService { } else { httpResponse.status = false; httpResponse.code = 500; - httpResponse.message = this.stringService.httpJsonPathFail || "JSONPath result was false"; + httpResponse.message = this.stringService.httpJsonPathFail; httpResponse.extracted = extracted; return httpResponse; }