Implement, raise, and catch, migration errors to send mdc messages
Description
The generic messages returned to mymdc when there is a migration issue are not very useful, this implements exceptions which are raised when there is a problem with migration, the exceptions get caught and the passed on to mymdc.
This goes around the current implementation of errors (webservice::messages::Errors
) as I couldn't figure out a good way to use them (setting mymdc status and then returning Failed for the migration wait would just instantly re-set the status to the generic message), so instead I added a MigrationError
exception class which is raised if there seems to be a migration issue. This then gets caught in handle_dark_request
and handle_correct
, and the status is sent.
How Has This Been Tested?
Tested w/o the mymdc status update locally, errors are logged correctly
Relevant Documents (optional)
https://in.xfel.eu/redmine/issues/103754
Types of changes
- New feature (non-breaking change which adds functionality)
Checklist:
-
My code follows the code style of this project. -
I added tests where appropriate.