Project

General

Profile

Actions

Bug #35076

open

job invocation api doesnt show all validation errors

Added by Maria Agaphontzev over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Foreman
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

When saving a job invocation the validation checks `job_invocation`, `targeting` and `pattern_template_invocations`.
But the it shows error info only for job_invocation and will not show information about targeting and pattern_template_invocations errors.
context code in `app/models/job_invocation_composer.rb`

  def save!
    if valid?
      job_invocation.save!
    else
      raise job_invocation.flattened_validation_exception
    end
  end


Related issues 1 (0 open1 closed)

Related to Foreman Remote Execution - Bug #33397: Propagate triggering errors when creating job invocations via APIClosedOndřej PražákActions
Actions

Also available in: Atom PDF