You cannot obtain the request context in your filter because that object hasn't been created yet. You'll have to find another way to get the information you need. If you only have one site and all you need is the name of the error page, then you can go read the default.site file directly with an XML parser.
My filter in this case gets invoked but I get null context object with same code.Dont know what is wrong.