Details
-
Bug
-
Resolution: Fixed
-
Major
-
COmanage Match 1.0.0 (Suitable Pear)
-
COmanage Match dated 6/23/2019
PHP 7.3.6
Postgres 11.1
Windows Server 2016
Description
If a request to the Match API triggers a search of the MatchGrid, the first rule encountered that contains an attribute that is marked "Required", but is not included (or without non-null value) in the input object triggers an Internal Server Error response...
debug.log:
Debug:
/
{SOR Ref ID}No value found for required attribute
{attribute name}skipping rule
{rule name}Debug: Preparing response with status code 500
Error.log and response contain: Required attribute
{attibute name}not found in request
The language in the documentation and the debug log file indicate that the 500 is an unexpected result for this condition.
Implemented at MatchService.php line 473-476
if($ruleattr->attribute->required)
Additionally, it appears that lines 478-479 make every attribute "Required" as defined in the Confluence page (No way to test an empty value against MatchGrid)
Log::write('debug', $sor . "/" . $sorid . " No value found for attribute " . $ruleattr->attribute->name . " skipping rule " . $rule->name);
continue 2;