Update Reg Center API:wrong error message thrown for when Exceptional Holiday Date format is invalid

Story point estimate

Description

Steps:
Update registration center API:
When the date format is sent in a wrong format in the request of this API, worng error message is thrown.
Request:
{
"id": "string",
"metadata": {},
"request": {
"addressLine1": "Test Address 1",
"addressLine2": "Test Address 2",
"addressLine3": "Test Address 3",
"centerEndTime": "17:00:00",
"centerStartTime": "09:00:00",
"centerTypeCode": "REG",
"contactPerson": "TestPerson",
"contactPhone": "9663089998",
"exceptionalHolidayPutPostDto": [
{
"exceptionHolidayDate": "12/12/2012",
"exceptionHolidayName": "TestHoliday",
"exceptionHolidayReson": "CenterCreation"
}
],
"holidayLocationCode": "RBT",
"id": "Tcnt1",
"isActive": true,
"langCode": "eng",
"latitude": "33.995612",
"locationCode": "RBT",
"longitude": "-6.815281",
"lunchEndTime": "14:00:00",
"lunchStartTime": "13:00:00",
"name": "Test Center",
"perKioskProcessTime": "00:15:00",
"timeZone": "Test Time zone",
"workingHours": "8:00:00",
"workingNonWorkingDays": {
"fri": true,
"mon": true,
"sat": true,
"sun": false,
"thu": true,
"tue": true,
"wed": true
},
"zoneCode": "STT"
},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
}

Actual response:
{
"id": "string",
"version": "string",
"responsetime": "2020-02-27T06:44:09.901Z",
"errors": [
{
"errorCode": "KER-MSD-039",
"message": "Text \u002712/12/2012\u0027 could not be parsed at index 0 format should be yyyy-mm-ddThh:mm:ss format"
}
]
}

Expected REsponse:
{
"id": "string",
"version": "string",
"responsetime": "2020-02-27T06:44:09.901Z",
"errors": [
{
"errorCode": "KER-MSD-999",
"message": "request.exceptionalHolidayPutPostDto[0].exceptionHolidayDate: Invalid Date Format"
}
]
}

Environment

QA

Activity

Show:

ravi.kant2@mindtree.com March 17, 2020 at 10:17 AM

Issue is fixed and working as expected. For invalid format in exceptional holiday message is updated to:
{
"id": "string",
"version": "string",
"responsetime": "2020-03-16T21:44:02.539Z",
"errors": [
{
"errorCode": "KER-MSD-999",
"message": "request.exceptionalHolidayPutPostDto[0].exceptionHolidayDate: Invalid Date Format"
}
]
}

Unresolved

Details

Assignee

Reporter

Severity

Major

Release Number

Closed Date

Mar 17, 2020, 10:17 AM

Rootcause

Coding issue

Time tracking

2.33h logged

Priority

Created February 27, 2020 at 7:03 AM
Updated March 17, 2020 at 2:57 PM

Flag notifications