Redirect uri on error raise

This is a proposal to solve Issue #162