Add error method for provider.