0% found this document useful (0 votes)
18 views

Final Notes - Guardrails2

report de erros

Uploaded by

mariliasm05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Final Notes - Guardrails2

report de erros

Uploaded by

mariliasm05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Final Notes

1) create/update guardrails:
We are not validating whether the “asset/datastream” pair exists in the source field;
Individually, it also does not validate whether the asset or datastream exists.

Evidence: asset/datastream does not exist.

Evidence: datastream does not exist.


Evidence: asset does not exist.
2) When a data type different from the one expected in the value field is sent, the generic “bad
format” response is sent without locating the field. [C1022242]

Payload:
{
"resource": "krn:ad:qa-mm-guard-error-asset-0-183126/qa-mm-guard-error-number-4-
176922",
"control_disabled": false,
"number": {
"min": {
"value": "string",
"inclusive": true
},
"max": {
"value": 20,
"inclusive": false
},
"relative": {
"increase": {
"min": {
"value": 2,
"inclusive": true,
"type": "value"
},
"max": {
"value": 10,
"inclusive": true,
"type": "value"
}
},
"decrease": {
"min": {
"value": 2,
"inclusive": true,
"type": "value"
},
"max": {
"value": 3,
"inclusive": true,
"type": "value"
}
}
}
},
"updater": {
"number": {
"min": {
"source": "krn:ad:qa-mm-guard-error-asset-0-183126/qa-mm-guard-error-number-0-
690406",
"inclusive": true
},
"max": {
"source": "krn:ad:qa-mm-guard-error-asset-0-183126/qa-mm-guard-error-number-0-
690406",
"inclusive": true
}
}
}
}


Response:
{
"name": "err_bad_format",
"title": "Bad format",
"description": "Invalid format"
}
Conclusion: to keep as it is.

3) Create/Update Guardrail and bulk create/update with invalid source:


a) The guardrail object is fully returned in the response.
Also verified sending: invalid type ; non-existing type; and invalid source field;
b) Type is returned in the following format: type:1

Payload:

{
"resource": "krn:ad:qa-mm-guard-error-asset-0-183126/qa-mm-guard-error-number-4-
176922",
"control_disabled": false,
"number": {
"min": {
"value": 10,
"inclusive": true
},
"max": {
"value": 20,
"inclusive": false
},
"relative": {
"increase": {
"min": {
"value": 2,
"inclusive": true,
"type": "value"
},
"max": {
"value": 10,
"inclusive": true,
"type": "value"
}
},
"decrease": {
"min": {
"value": 2,
"inclusive": true,
"type": "value"
},
"max": {
"value": 3,
"inclusive": true,
"type": "value"
}
}
}
},
"updater": {
"number": {
"min": {
"source": "non-existing-asset",
"inclusive": true
},
"max": {
"source": "krn:ad:qa-mm-guard-error-asset-0-183126/qa-mm-guard-error-number-0-
690406",
"inclusive": true
}
}
}
}


Response:

[
{
"name": "err_invalid_krn",
"title": "Invalid KRN",
"description": "KRN is invalid or not set",
"solution": "Please fix the payload",
"payload": {
"field": "number.updater.min.source",
"resource": "non-existing-asset",
"value": {
"min": {
"value": 10,
"inclusive": true
},
"max": {
"value": 20,
"inclusive": false
},
"relative": {
"increase": {
"min": {
"type": 1,
"value": 2,
"inclusive": true
},
"max": {
"type": 1,
"value": 10,
"inclusive": true
}
},
"decrease": {
"min": {
"type": 1,
"value": 2,
"inclusive": true
},
"max": {
"type": 1,
"value": 3,
"inclusive": true
}
}
},

# retornar o valor do caminho


"updater": {
"min": {
"source": "non-existing-asset",

"inclusive": true
},
"max": {
"source": "krn:ad:qa-mm-guard-error-asset-0-183126/qa-mm-guard-error-
number-0-690406",
"inclusive": true
}
}
}
}
}
]
Conclusion: to be fixed.

4) Delete guardrail and bulk delete:


Returns empty resource if delete a non-existing resource.
[C1022249]

{
"name": "err_not_found",
"title": "Resource not found",
"description": "Resource not found",
"payload": {
"resource": ""
}
}
Conclusion: remove the payload.

You might also like