make groovy request accept 404 -- Error: hudson.AbortException: Fail: the returned code 404 is not in the accepted range: [[100‥399]]
You can use validResponseCodes
parameter to specify a range of valid response codes
response = httpRequest acceptType: "APPLICATION_JSON", contentType: "APPLICATION_JSON", customHeaders: [[name: 'Authorization', value: token]], url: server+port+"/exams"+testID, validResponseCodes: '200:404'