Additional error checking

Adding a preemptive ‎check to see if the provider has thrown an error from a previous redirect