Adds some debug output to the middleware
Uses OADAError over Error objects