Improve error messages from create_note
What does this MR do?
The design of create_note meant that it would fail correctly, but with very un-informative error messages. This re-write of the method means that we raise the validation error to the programmer with details of what the problem actually is.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry for user-facing changes, or community contribution. Check the link for other scenarios. -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
This does not change the behaviour of the code.
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.