Do not rely on a leap webapp specific error class.

This caused all tests to fail but even more would break compatibility with everything but the webapp.