add domain error handling middleware for service