Updated error middleware to omit the full error object to console instead of just the error stack.