The purpose of an error message is to help the user who encountered it, to learn how to avoid the behavior that caused the problem. The program has encountered a situation that it can not handle, and needs to tell the user, so that the user (or someone else) can arrange to avoid the situation that the program can not handle.
The error an unexpected error occurred
is entirely useless in this goal. It give the user no hint about what might be changed in order to avoid the problem.
I don't believe it is possible in general for the program to determine the motive of the user when the problem was encountered. You might think that the situation happens only when the user is being naughty, but if the same problem occurs due to an unanticipated combination of things, and you display a you were naughty
message, the user might be quite incensed and rightly so!
Programs are hard enough to use, that every error message should use every change to give as clear an explanation of what it can't handle. The message you do not have access right to that resource
is clear and to the point. Maybe the user was manipulating the URL (is that a crime?) But maybe their access rights were set up incorrectly. Or maybe their rights have changed since they favorited the URL. Or maybe there is a programming error that caused them to get there by no means of their own. As the program is modified in the future, you can not anticipate today what situations the user might encounter. In many of these cases, letting the user know that it is a rights problem might lead them to resolve the problem -- and then everyone wins.
Because of all this, you give a clear, accurate description of what situation it is that the routine can not handle, and report that to the user. You users will thank you for that in the long run.
I have written quite a bit more on this in a blog post: http://agiletribe.wordpress.com/2013/08/24/error-message-should-be-clear-plain-and-direct/