added error handling by surrounding the middleware with a try/catch and marked the /sdpath tenant as obsolete