Sometimes we may not want to receive an error email. Let's add a check that can be optional and when called, a bool result (or some indicator) is returned to determine whether to continue with the error email reporting or not.
An example of this is the following case:
err.Error() == "pq: canceling statement due to user request"