I have a custom HandleError
attribute that deals with errors on the MVC pipeline; I have an protected void Application_Error(object sender, EventArgs e)
You haven't shown how exactly are you handling the errors in your Application_Error event nor how does your custom HandleAttribute is implemented so it's hard to guess what the problem might be. A common problem to watch for when implementing Application_Error is that you render some error view which itself throws an error. Think for example an error view that depends on a Layout and inside this layout you are calling a Html.Action
helper to render the contents of another action that itself does database access and stuff. Your error views should be as static as possible. Ideally you should have a different Layout for them to avoid those kind of situations.
I may also suggest you taking a look at the following approach for handling errors.