#1105 [RFE] Provide a better error message module validation fails to a infrastructure issue
Closed: Fixed 5 years ago by mprahl. Opened 5 years ago by mprahl.

When a user submits a module build and MBS fails establishing a session with Koji, the module build fails with the reason An unknown error occurred while validating the modulemd. This is misleading and leads the user to think their modulemd is invalid. Let's clarify this error when it's not an issue with their modulemd file.


To do this, we probably want to normalize the exceptions that are raised by KojiModuleBuilder.get_session. That method should always raise the same type of exception so this particular error scenario can be handled cleanly in modules.py.init.

@lucarval I've tried to create a test for it, but it seems that modules.init doesn't call KojiModuleBuilder.get_session. Or I didn't understand this.

It doesn't call it directly, you're right. But something in there does. The error mentioned in description of issue is only found there. I was thinking if we had a custom exception, we could add another except-block in init to display the correct message.

@lucarval Yes, so that the way I thinking it works. I was just wondering how to test it then.

Metadata Update from @vmaljulin:
- Issue assigned to vmaljulin

5 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #1151 Merged 5 years ago