Skip to content

Commit

Permalink
Merge pull request #231 from GOKULRAJ136/MOSIP-23036
Browse files Browse the repository at this point in the history
MOSIP-23036 : Added error message for invalid JSON format in policies data
  • Loading branch information
aranaravi authored Feb 23, 2024
2 parents 3be6d70 + cd3bac1 commit 48268fc
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,11 @@ export class MaterDataCommonBodyComponent implements OnInit {
url = url;
}
else if(url === "policymanager/policies"){
this.primaryData["policies"] = JSON.parse(this.primaryData["policies"]);
try {
this.primaryData["policies"] = JSON.parse(this.primaryData["policies"]);
} catch (error) {
this.showErrorPopup(this.popupMessages.genericerror.invalidJson);
}
}
if(this.primaryData.id || this.primaryData.ftpChipDetailId){
this.primaryData["isItForRegistrationDevice"] = true;
Expand Down
3 changes: 2 additions & 1 deletion pmp-ui/src/assets/i18n/ara.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@
},
"genericerror": {
"fieldValidation": "هذه الخانة مطلوبه",
"fieldNameValidation": " مطلوب"
"fieldNameValidation": " مطلوب",
"invalidJson": "تنسيق JSON غير صالح لبيانات السياسات"
},
"serverError": {
"PMS_COR_001": "معلمة الإدخال مفقود",
Expand Down
11 changes: 2 additions & 9 deletions pmp-ui/src/assets/i18n/eng.json
Original file line number Diff line number Diff line change
Expand Up @@ -453,14 +453,6 @@
"button": "Upload",
"cancel": "Cancel"
},
"filters": {
"titleTxt": "Map Policy Group",
"footerButtons": {
"resetTxt": "Reset",
"cancelTxt": "Cancel",
"applyTxt": "Save"
}
},
"filters": {
"titleTxt": "Add Filters",
"footerButtons": {
Expand All @@ -475,7 +467,8 @@
},
"genericerror": {
"fieldValidation": "This field is required",
"fieldNameValidation": " is required"
"fieldNameValidation": " is required",
"invalidJson": "Invalid JSON format for policies data"
},
"serverError": {
"PMS_COR_001": "Missing Input Parameter",
Expand Down
3 changes: 2 additions & 1 deletion pmp-ui/src/assets/i18n/fra.json
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@
},
"genericerror": {
"fieldValidation": "Ce champ est requis",
"fieldNameValidation": " est requis"
"fieldNameValidation": " est requis",
"invalidJson": "Format JSON non valide pour les données des règles"
},
"serverError": {
"PMS_COR_001": "Paramètre d'entrée manquant",
Expand Down
3 changes: 2 additions & 1 deletion pmp-ui/src/assets/i18n/hin.json
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@
},
"genericerror": {
"fieldValidation": "यह फ़ील्ड आवश्यक है",
"fieldNameValidation": " आवश्यक है"
"fieldNameValidation": " आवश्यक है",
"invalidJson": "नीतियों के डेटा के लिए अमान्य JSON प्रारूप"
},
"serverError": {
"PMS_COR_001": "गुम इनपुट पैरामीटर",
Expand Down
3 changes: 2 additions & 1 deletion pmp-ui/src/assets/i18n/kan.json
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@
},
"genericerror": {
"fieldValidation": "ಈ ಜಾಗ ಬೇಕಾಗಿದೆ",
"fieldNameValidation": " ಅಗತ್ಯವಿದೆ"
"fieldNameValidation": " ಅಗತ್ಯವಿದೆ",
"invalidJson": "ನೀತಿಗಳ ಡೇಟಾಕ್ಕಾಗಿ ಅಮಾನ್ಯ JSON ಫಾರ್ಮ್ಯಾಟ್"
},
"serverError": {
"PMS_COR_001": "ಇನ್‌ಪುಟ್ ಪ್ಯಾರಾಮೀಟರ್ ಕಾಣೆಯಾಗಿದೆ",
Expand Down
3 changes: 2 additions & 1 deletion pmp-ui/src/assets/i18n/tam.json
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@
},
"genericerror": {
"fieldValidation": "இந்த புலம் தேவை",
"fieldNameValidation": "தேவைப்படுகிறது"
"fieldNameValidation": "தேவைப்படுகிறது",
"invalidJson": "கொள்கைகள் தரவிற்கான தவறான JSON வடிவம்"
},
"serverError": {
"PMS_COR_001": "உள்ளீட்டு அளவுரு இல்லை",
Expand Down

0 comments on commit 48268fc

Please sign in to comment.