Add errors last
This commit is contained in:
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user