From 7caf2cf5e60cda27f98c6c449204490b8a756bc0 Mon Sep 17 00:00:00 2001 From: Adam Ruzicka Date: Wed, 8 Nov 2023 10:39:55 +0100 Subject: [PATCH] Fixes #36904 - Better handling of tailoring file errors on create --- app/controllers/tailoring_files_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/tailoring_files_controller.rb b/app/controllers/tailoring_files_controller.rb index 1018e8825..db984206a 100644 --- a/app/controllers/tailoring_files_controller.rb +++ b/app/controllers/tailoring_files_controller.rb @@ -24,6 +24,9 @@ def create else process_error end + rescue RestClient::Exception => e + @tailoring_file.errors.add(:scap_file, :invalid, message: e.http_body) + process_error end def edit