colon is not allowed inside message strings in hooks
Confusing error messages
I guess that tweaking the phrase to "/etc/borgmatic.d/photos.yaml: An error occurred" is more general and don't cause one to misinterpret it as a problem in config.
Funny story, let me give you…
Confusing error messages