Null vs. Error?
You call a method to retrieve information about an object with a particular ID, but the record does not exist. Is this an exception? Or not? It is hard to answer.
You call a method to retrieve information about an object with a particular ID, but the record does not exist. Is this an exception? Or not? It is hard to answer.
We all struggle with the correct wording for error messages. There are often many edge cases to consider. One guideline that can help, is to make the error message a literal representation of what the service was doing, and what it is that didn't work.