Add preparation for provider (bug 942361)

this should be ``return app.error...`` no?