Groovy error:A Method called by the script failed on Line:30 with error:Error Occurred:UNAUTHORIZED
Summary:
I am running a groovy script in EPM FCCS and getting error "Groovy error : A Method called by the script failed on Line:30 with error : Error Occurred : UNAUTHORIZED"
REST connection i created using my user credential , which have full access to application.
Dint see any errors / Validation issues when i run Groovy script Validator.
Below is the code
// Use Substitution Variables for Start and End periods
def StartPer = operation.application.getSubstitutionVariableValue("PipelineStartPeriod")
def EndPer = operation.application.getSubstitutionVariableValue("PipelineEndPeriod")
println("StartPer = $StartPer")
println("EndPer = $EndPer")
// Define Pipeline and variables to run
HttpResponse<String> jsonResp = operation.application.getConnection("TEST1").post("/aif/rest/V1/jobs")