Skip to content

Commit

Permalink
Merge pull request #81 from Jagannath-Padhy/master
Browse files Browse the repository at this point in the history
error obj missing
  • Loading branch information
sandeepshahi authored Aug 12, 2024
2 parents 87b7715 + 668639f commit 150c27e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions schema/Retail/RET11/on_search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ export const FnBonSearchSchema = {
properties: {
id: {
type: 'string',
pattern:'^[a-zA-Z0-9]{1,12}$',
errorMessage: 'categories.id should be alphanumeric and upto 12 characters',
},
parent_category_id: {
type: 'string',
Expand Down
3 changes: 2 additions & 1 deletion utils/Retail/Select_OOS/on_select_oos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ export const checkOnSelect_OOS = (data: any) => {
let ON_SELECT_OUT_OF_STOCK_error: any = {}
try {
logger.info(`Checking domain-error in /${constants.ON_SELECT}`)
if (data.hasOwnProperty('error')) {
if (!data.hasOwnProperty('error')) {
ON_SELECT_OUT_OF_STOCK_error = data.error
errorObj[`${ApiSequence.ON_SELECT_OUT_OF_STOCK}_error`]='error object missing'
}
} catch (error: any) {
logger.info(`Error while checking domain-error in /${constants.ON_SELECT}, ${error.stack}`)
Expand Down

0 comments on commit 150c27e

Please sign in to comment.