Add errors last

This commit is contained in:
Chase Tucker
2025-08-26 09:10:15 -07:00
parent 47405863d7
commit a196bffd41
7 changed files with 152 additions and 163 deletions

View File

@ -263,6 +263,7 @@ API scan.ID.PATCH
SRP_Stopwatch('Start', 'IDPatchResponseTime')
// First confirm that this is a valid Scan ID.
jsonScan = Scan_Services('GetScansRow', ScanID, True$)
ErrMsg = ''
If Error_Services('NoError') then
// Confirm that all required data has been scanned before allowing the "accept" field to be updated.
ParseResponse = SRP_JSON(objResource, 'Parse', jsonScan)
@ -293,7 +294,7 @@ API scan.ID.PATCH
end
end else
ScanNotAcceptableReason = SRP_JSON(objResource, 'GetValue', 'scan.notAcceptableReason')
Error_Services('Add', ScanNotAcceptableReason)
ErrMsg = ScanNotAcceptableReason
end
SRP_JSON(objResource, 'Release')
end else
@ -324,6 +325,8 @@ API scan.ID.PATCH
end
LogData<6> = ResponseStatusCode
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end api
@ -438,3 +441,4 @@ return