use custom redirect functions for authorization code grant errors when the redirect uri is a client end point