From c65e1b0a537047970f5c9495da1eff3a3f11361c Mon Sep 17 00:00:00 2001 From: mprahl Date: Wed, 20 Mar 2019 13:43:22 -0400 Subject: [PATCH] Log the exception when an invalid modulemd is encountered This will help us determine why a modulemd couldn't be parsed other than formatting issues. An example of this is if the database session becomes stale, the exception is not due to the modulemd being invalid. --- module_build_service/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/module_build_service/models.py b/module_build_service/models.py index 5da2dfa0..8fa6a80a 100644 --- a/module_build_service/models.py +++ b/module_build_service/models.py @@ -384,6 +384,7 @@ class ModuleBuild(MBSBase): mmd = Modulemd.Module().new_from_string(self.modulemd) mmd.upgrade() except Exception: + log.exception('An error occurred while trying to parse the modulemd') raise ValueError("Invalid modulemd") return mmd