Update: partial improvements to error presentation, including passing error_message to now reserved ':{error_message}' replacement parameter
Process and pass the error message to the string.
It seems that this was not happening.
There are a few other issues:
- arrays were being passed, increasing complexity (unnecessarily).
- use preg_match() instead of direct string comparisons on postgresql error messages to be consistent.
- ':{failure_reasons} array is no longer neded with this change.
While reviewing and making these changes, I noticed that the entire error message process is a bit inconsistent.
I suspect that I had changed how I was processing errors along the process.
More work needs to be done, but that is being put off to later.