Adding a redirect on error condition.